I make the file with PHP from a MySQL database like this:
$result = mysql_query($sql);
$fp=fopen('dump.csv','w');
while($row=mysql_fetch_row($result)){
fputs($fp,implode(',',$row)."\n" );
}
fclose($fp);
Hi,
Yes, .csv is the actual extension... The file is called for example dump.csv, but I can choose that myself in my script...
csv is a comma seperated list... So it's a list of all the data that I retrieve from a database and all the records are seperated by commas... If I open it in excel...
Note...
It didn't just come up the first time... And it gave me choices of what was going to seperate the columns... So I had to choose commas, since it is a comma seperated list...
I don't remember the excact choices I got, they only came the first time I think...
And ctr+shift+right-click didn't give me an Open with... Option... It gave Open in new window, but that didn't help...
1. Yes, Open is the default method...
2. the .csv opens in an excel sheet inside IE... If I open a .csv file on my local machine it launches Excel, and I get some choices as to how I want to view the data...
When I open from the web data shows up like this...
lastname1,firstname1...
Hi,
I want, when a link to a .csv file is clicked, to launch Excel automatically... As of now, an Excel sheet is opened inside IE, and that doesn't work for me...
I've tried (in explorer) to change the open with... property of csv files. (It was already set to Excel) and I tried experimentally...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.