Categories > OpenTBS with XLSX >

Problem with tbs:date, tbs:time and xlsxDate

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Christoph
Date: 2017-01-11
Time: 13:40

Problem with tbs:date, tbs:time and xlsxDate

Hello

After chaning the locale in our project we found a problem with a column with tbs:date. The generated excel contained now <v>42725,744849537</v> instead of <v>42725.744849537</v>. With that excel fails to open correctly (shows error and can not repair the problem). The Problem is the same as discussed in http://www.tinybutstrong.com/forum.php?thr=3463. Just different place.

What worked for me was to change in the function MsExcel_ChangeCellValue on line 3796 "$Value = ($t/86400.00)+25569;" to "$Value = var_export((float) ($t/86400.00)+25569, true);".

With that the implicit converion from float to string does not lead to a wrong decimal separator and it works again.

Best Regards,
Christoph