This topic is locked

csv export - field order

6/13/2006 5:45:13 PM
PHPRunner General questions
C
colin_h author

Firstly, its sad to see the forum hacked.
CSV - i want to be able to change the order of exported csv fields.
This can be done in step 8 (field order and totals), but whichever order i put the fields in, there is absolutely no change in the field order of the output csv file. HELP.
I am running PHPrunner ver3.
Thanks

J
Jane 6/14/2006

Colin,
export to CSV works correct on the my test box.

What build of PHPRunner you use?

C
colin_h author 6/14/2006

Build 113

C
colin_h author 6/14/2006

Hi. It seems to be OK. I suspect that i didnt refresh the main page - idiot eh!
But i have a formatting question. Is there a way to remove the header row on csv files?
And can quotes be removed on selected (some not all) fields (for later converting into TomTom OV2)
Thanks for the help

Sergey Kornilov admin 6/15/2006

Colin,
you can modify export.php in Template Editor for this purpose.
Find a function named ExportToCSV and remove the following lines:

// write header

$outstr="";

##EXPORTFIELDS##

if($outstr!="")

$outstr.=",";

$outstr.= '"'.Label("##FIELD##").'"';

##/EXPORTFIELDS##

echo $outstr;

echo "\r\n";


The same idea applies to editing generated tablename_export.php file.