Creating a batch file from a CSV file
Posted: Wed Aug 18, 2004 4:43 am
Hi guys
I work in testing and I have a CSV file containing all the tests I use (Several thousand). Amongst other things, the tests have a status and I need to extract the tests out, edit them with some find/replace work and put it all back together into a batch file to run the ones that are not yet run.
Anyway, I have got as far aswhich opens the csv file into internet explorer, but it is totally un formatted. It is not even seperated by line (Which I thought happened automatically)
Anyone point me in the direction of a function I could make use of to split it into lines?
Cheers guys - LinkJames
I work in testing and I have a CSV file containing all the tests I use (Several thousand). Amongst other things, the tests have a status and I need to extract the tests out, edit them with some find/replace work and put it all back together into a batch file to run the ones that are not yet run.
Anyway, I have got as far as
Code: Select all
<?PHP
$filename = 'E:\Testing\testresults\dnt3.csv';
$fp = fopen($filename, "r");
$contents = fread($fp, filesize($filename));
fclose($fp);
echo $contents;
?>Anyone point me in the direction of a function I could make use of to split it into lines?
Cheers guys - LinkJames