This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 2

zero start value disappears in Excel


  1. arnaudboub
    Member

    hello,
    when I export to Excel a telephone number or, if there is a zero start value, it disappears in the data sheet view!
    How to make it appear (French phone number starts with "0" zero)

    Thank you

    Posted 14 years ago #
  2. yuniar

    This is because Excel automatically format those numbers and remove the leading zero.
    To avoid this behaviour, we can force to write those fields as text.

    Edit your "export_entries.php", search around line 375 and you'll find this:

    $worksheet->write($row_num, $col_num, $data);

    replace that code with this one:

    $worksheet->writeString($row_num, $col_num, $data);

    That should display the leading zero.


    MachForm Founder

    Posted 14 years ago #
  3. arnaudboub
    Member

    Great

    Thank you very very much
    ;-)

    Posted 14 years ago #

RSS feed for this topic

Reply