In-place activation of .CSV

  • Thread starter Thread starter Cathy
  • Start date Start date
C

Cathy

When I try to download a .csv file into IE it appears as a plaint text
file. Whereas if I try the same with an .xls file, it appears as an
Excel spreadsheet. Why the difference? How can I get the .csv file to
appear correctly as an Excel spreadsheet?

A few more details... the .csv is properly formatted as comma separated
and double-clicking on it in a file explorer will fire up Excel and the
..csv loads correctly.

Cathy
 
Cathy said:
When I try to download a .csv file into IE it appears as a plaint text
file. Whereas if I try the same with an .xls file, it appears as an
Excel spreadsheet. Why the difference? How can I get the .csv file to
appear correctly as an Excel spreadsheet?

A few more details... the .csv is properly formatted as comma separated
and double-clicking on it in a file explorer will fire up Excel and the
.csv loads correctly.

Cathy

Save the file to your hard drive.
Hold the Shift key while you right click it.
Choose open with and choose Excel, checking the box to always use this
program.
 
Frank said:
Save the file to your hard drive.
Hold the Shift key while you right click it.
Choose open with and choose Excel, checking the box to always use this
program.

Hi Frank,

I've just tried that and that's not the solution. As I said, when I
double click on a .csv in a file explorer it opens in Excel
automatically anyway. It's just when I try in-place activation in IE
that it's opened as plain text. In-place activation of a .xls file open
Excel with IE - and that's what I'd like to achieve with .csv files.
I'm using IE6.

Cathy
 
Cathy said:
Hi Frank,

I've just tried that and that's not the solution. As I said, when I
double click on a .csv in a file explorer it opens in Excel
automatically anyway. It's just when I try in-place activation in IE
that it's opened as plain text. In-place activation of a .xls file open
Excel with IE - and that's what I'd like to achieve with .csv files.
I'm using IE6.

Cathy

I guess I don't know enough about Excel to help.
 
With a bit of fiddling around, I've found the answer.

I'm using a Jetty web server and this needs to understand what to do
with a csv file...

org.mortbay.jetty.Server Webserver = new org.mortbay.jetty.Server();
ServletHttpContext context = (ServletHttpContext) Webserver.addContext(
"/" );
context.setMimeMapping( "csv", "application/vnd.ms-excel" );

That was all I needed to do.

Cathy
 
Back
Top