Export Excel: Number fields recognized as date

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
mpol_ch
User
Posts: 877
Location: Switzerland

Export Excel: Number fields recognized as date

Post 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


danielc
User
Posts: 1601

Post 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.


mpol_ch
User
Posts: 877
Location: Switzerland

Post by mpol_ch »

Hello danielc

thanks a lot your your response.

mpol_ch


Post Reply