Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - ASP / CSV / Excel / Delimiters
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ASP / CSV / Excel / Delimiters

 Post Reply Post Reply
Author
Gary View Drop Down
Senior Member
Senior Member
Avatar

Joined: 20 March 2002
Location: United Kingdom
Status: Offline
Points: 326
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gary Quote  Post ReplyReply Direct Link To This Post Topic: ASP / CSV / Excel / Delimiters
    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 \\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
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Skeever View Drop Down
Newbie
Newbie


Joined: 25 February 2003
Location: Norway
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote Skeever Quote  Post ReplyReply Direct Link To This Post Posted: 16 March 2006 at 6:07pm
I found this method working nicely..

http://www.aspcode.net/default.aspx?p=a&i=161
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.