Page 1 of 1

Export Excel: Number fields recognized as date

Posted: Wed Sep 17, 2014 9:31 pm
by mpol_ch

Hello

I am using the PHPMAKER with PHPREPORTMAKER. When I export a table some number fields of table are recognised as DATE fields. Example: 8.20 is recognised "Aug 20".
How can I avoid this?

Is that possible to export the SUM and AVG field as formule in excel, so that it will adjust the result when the user change the column content...

thanks

mpol_ch


Re: Export Excel: Number fields recodnized as date

Posted: Thu Sep 18, 2014 4:49 pm
by danielc

What datatype you have setup for this field?

Try to use Row_Rendered server event (see Server Events and Client Scripts in the help file) to add the value with "'":

if ($this->Export == "excel")
$this-><yourfield>->CurrentValue = "'" . $this-><yourfield>->CurrentValue;

Or you may try to use PHPExcel extension (if you are registered user and use v11) to see. See Tools in help file.

For SUM and AVG field, the exported data is value. So, I do not think you can change it to formula.


Re: Export Excel: Number fields recognized as date

Posted: Fri Sep 19, 2014 5:19 pm
by mpol_ch

Hello danielc

thanks a lot your your response.

mpol_ch