Home › Forums › Quform WordPress › Export long numeric value becomes scientific notation
- This topic has 3 replies, 2 voices, and was last updated 4 years, 4 months ago by Ally.
- AuthorPosts
- July 23, 2020 at 9:07 am #31685VenomParticipant
Hi Ally,
When I try to export entries for a long numeric string over 16 digits. The value in downloaded CSV, HTML is displayed as scientific notation. It seems that is the issue of PhSpreadsheet .
https://github.com/PHPOffice/PhpSpreadsheet/issues/357#issuecomment-507753020
I followed a workaround to add the following code to Exporter.php before 342 to set the cell style in TEXT format before storing the value.
$style = $sheet->getStyleByColumnAndRow($columnCount, $rowCount); $style->getNumberFormat()->setFormatCode('#');
Please let me know if there is other setting to config the value format for export.
Regards,
Venom
July 24, 2020 at 9:39 am #31686AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
July 24, 2020 at 10:17 am #31694VenomParticipantAgree. That will be great to add a hook for us to modify data before setting the value.
However, I am afraid of that is the issue of PhpExcel instead of your code.
May be the hook could be supplied with the format code and it will be passed to the cell style before writing into the CSV/Excel/Html?
July 27, 2020 at 10:17 am #31704AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
- AuthorPosts
- You must be logged in to reply to this topic.