Export long numeric value becomes scientific notation

Home Forums Quform WordPress Export long numeric value becomes scientific notation

This topic is: not resolved
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #31685
    Venom
    Participant

    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

    #31686
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #31694
    Venom
    Participant

    Agree. 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?

    • This reply was modified 4 years, 4 months ago by Venom.
    • This reply was modified 4 years, 4 months ago by Venom.
    #31704
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy