Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Truoble Opening CSV file in Excel from IE

We have a web portal application (java servlet) that sends a MIME stream to
the browser client (Internet Explorer) that is essentially a csv file. This
is how we do that -
response.setContentType("application/octet-stream");
response.setHeader("Content-Disposition:","attachment;filename=Filename.csv");

IE presents the user with its "standard" file download dialog (open, save,
etc. - the file name is listed as Filename.csv in the dialog). When the
user chooses to open the file IE loads the stream (csv file) into an Excel
session (under IE) and the data is parsed properly - HOWEVER the problem is
in the file name under Excel. The file name comes up as Filename[1].csv in
Excel (the worksheet tab name is a goofy derivation of that -
csv.Filename[1]) The square-bracket-index value is being added by IE (a temp
file by that name is actually stored in the IE temp folders). Excel is
choking on the [] values, I believe. How do I either tell EI not to put the
index into the name or have Excel ignore the square brackets?

If I didn't know better this almost seems like a bug in Excel (I am using
Excel 2000 for testing). Transitioning a data stream (i.e a file) from IE to
Excel should be cleaner than this - especially since Excel uses .csv as a
"supported" file type.

When the user chooses to save the .csv through IE a file WITHOUT the
square-bracket-index is placed on the local PC. When user opens that saved
csv in Excel everything parses ok and the file name is also ok.

Thanks
--
Joe Floeder
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
opening a file in Excel starts application but dose not open file Bob Shelton Excel Discussion (Misc queries) 1 July 2nd 08 07:51 PM
Opening file in Excel 2003 opens multipule instances of same file Ed_B Excel Discussion (Misc queries) 1 June 21st 07 07:10 PM
opening an excel file opens a duplicate file of the same file skm Excel Discussion (Misc queries) 1 December 7th 05 05:52 PM
"Unable to read file" error message when opening a Excel file that contains a PivotTable report. Tim Marsden Charts and Charting in Excel 2 October 15th 05 02:10 PM
Error:Invalid File format,while opening an Excel Template file Saurabh Excel Programming 1 January 17th 05 07:15 AM


All times are GMT +1. The time now is 07:59 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"