Print Page | Close Window

ASP / CSV / Excel / Delimiters

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=18669
Printed Date: 29 March 2026 at 7:39pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: ASP / CSV / Excel / Delimiters
Posted By: Gary
Subject: ASP / CSV / Excel / Delimiters
Date Posted: 10 March 2006 at 10:35am
Hi,
 
I have an asp page that create a csv formatted file and then displays a link to the file (<A HREF>). When the user clicks on the link, the csv is opened in Internet Explorer with an Excel look and feel (Columns, Rows, Cells, etc).
 
Now, if the user's local settings dictate a delimiter other than a comma (eg semi-colon), then the csv is formatted in this way (eg "A";"B";"C").
 
I have a user in Turkey whose delimiter is semi-colon, but when he opens the csv from the <A HREF>, IE displays each record's data in column A, and shows commas between each field/column data item.
 
If however, the user accesses the csv directly by file://\\servername\folder\file.csv - \\servername\folder\file.csv , then the csv opens in Excel and is correctly formatted (ie, data in Col A, Col B, Col C).
 
This suggests that something in IE is causing the formatting problem, but I cannot figure out what or where.
 
Any suggestions?
 
Many Thanks
Gary



Replies:
Posted By: dpyers
Date Posted: 10 March 2006 at 1:02pm
Sounds llike IE needs the mime type. Try response.writing the info after setting the response header to the xcel mime type instead of writing a link to the file.

-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: Skeever
Date Posted: 16 March 2006 at 6:07pm
I found this method working nicely..

http://www.aspcode.net/default.aspx?p=a&i=161



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net