IE Changes CSV to XLS

  • Thread starter Thread starter Richard Bailey
  • Start date Start date
R

Richard Bailey

We have a service on our website that allows users to
export data to Comma delimited files. One of the last
major Windows of Office updates changed internet
explorer. Lately, when clicking on an anchor link that
points directly at a .csv file, IE prompts the user to
save or open the file as an Excel spreadsheet. If the
user saves it, its saved with a .xls extension. The same
thing happens if the user right clicks on the file. It
shows up in the save dialog with a .xls extension.

When excel opens a .csv file renamed to .xls, each row of
data is scrunched together into a single cell with quotes
commas and all.

Is this something Microsoft changed on purpose? If I
build a page to output the file name in a HTTP header
will IE change the extension regardless? I'm dealing
with VERY simple users who get confused easily. I would
like to avoid long instructions if possible.
 
Richard,

I just ran into this csv to xls problem myself and wanted to let
you know how I fixed it. In IIS for the site or virtual directory go
to the HTTP Headers tab and click the File Types button under MIME
Map. Add the following entry:

csv
text/csv


This took care of it for me. Never had to do this before so not sure
what changed. Possibly because I'm running Office 2003 now.

Dan - MCP, MCSD
 
Back
Top