This topic is locked

CSV Export - decimal places and quoted strings

8/27/2006 11:56:58 AM
PHPRunner General questions
C
colin_h author

Hi,

I previously received advice how to remove all quotes from exported csv files, by commenting out a section on export.php. That worked fine.
In the csv file output, i have 3 columns of data. The first two must not have quotes, but the last one (3rd) must.

Is it possible to achieve this?
Secondly, on screen on the website, the retrieved data from a search shows 4 decimal places. But on the csv file output, the data is rounded to only 2 decimal places. As these are geographical co-ordinates, its not too helpful. How can i ensure that the exported csv data reflects the full amount that's in the database.
Your help on these two items would be very much appreciated.
Thanks

J
Jane 8/28/2006

Colin,
open ..._export.php file, find ExportToCSV function, locate following line:

$outstr.='"'.htmlspecialchars(GetData($rs,$row,"FieldName",$format)).'"';



and replace it with this one:

$outstr.=htmlspecialchars(GetData($rs,$row,"FieldName",$format));


PHPRunner saves data as it browses on the LIST page.

It seems that CSV settings truncate your values.