Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open .csv file in Excel, NOT in IE (6.0) (using win98)

Status
Not open for further replies.

XQmano

Technical User
Joined
Mar 11, 2003
Messages
7
Location
NO
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 to set the mime-type to application/excel...

How do I fix this??
 
Did you set Open as the default method? Or in other words, when you right-click on a .csv file in explorer which word appears in bold? (That is the default for a double-click.)
 
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
lastname2,firstname2
lastname3,firstname3
etc...

And it all comes into the same column... In Excel it is seperated, and the lastnames comes in the first column and the firstnames comes in the second column...
 
...and I get some choices ...

I don't think I know enough to be of any use, but I am curious as to what choices you get. When I open a .csv in Excel it automatically goes into columns. (I do get choices with .txt files, however.)
 
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...
 
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...

 
This is probably a silly question, but is the actual extension of the file .csv or are you just calling it that in a generic sort of way?

Also, what version of Excel is this?
 
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, it recognizes this and gives me the opportunity to split it up into columns.. But when opening it in excel INSIDE IE, I don't get that opportunity...

I use Excel 2000 and IE 6
 
I think you're wrong about your file being a real .csv file, because you've said that Excel "gives me the opportunity to split it up", whereas if Excel is opening a real csv file, it doesn't give you any chance of intervention, but splits the fields automatically.

Is there something else about the file that you can tell us?

Glenn.
 
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);

 
It's strange, but everywhere I've looked, I get no answer... Seems to be impossible...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top