This topic is locked

Exporting large numbers to Excel issue

8/2/2005 2:46:21 PM
PHPRunner General questions
prleo1 author

Admin,
In my equipment list, there are items that have serial numbers that are about 20 digits long. When this data is exported into excel or csv, these numbers are converted into scientific notation. How can I add a single quote on the left side and right side of the data in this column to all rows prior to the excel spreadsheet being created? By adding the single quotes, the numbers are not put into notation type syntax.

admin 8/3/2005

Hi,
you need to open ..._export.php file, find WriteTableData function and replace this line:
echo htmlspecialchars(GetData($rs,$row,"Field1", "..."));
with the following one:
echo "'".htmlspecialchars(GetData($rs,$row,"Field1", "..."))."'";