468,512 Members | 1,474 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,512 developers. It's quick & easy.

Excel gets renamed as as .xls[Sheet when you open it from ASP

I am using ASP to open a excel file.

I've noticed that Internet Explorer adds a number in square brackets to files downloaded from the internet and opened directly (i.e. by clicking 'Open' and not 'Save'). This creates a big problem with downloading Excel spreadsheets as square brackets are not a valid filename character inside Excel worksheet name.

When I click open, it opens the excel sheet with the sheet name
as .xls[Sheet and the excel filename as Sheet[1].xls.

Then we get the following error....

While renaming a sheet or chart, you entered an invalid name. Try one of
the following:

- Make sure the name you entered does not exceed 31 characters.
- Make sure the name does not contain any of the following characters:
: \ / ? * [ or ]
- Make sure you did not leave the name blank.

Please let me know any fix for this....Or is this any inbuilt IE problem...thanks

Can anyone tell me

1. why the worksheet is named as .xls[Sheet.Is there any way to avoid this.
2. Is it possible in ASP, we can rename the excel worksheet other than the name of the file, if yes how can we do it.

Any help would be appreciated as I've spent hours on this already...

cheers,
Kunal
Dec 20 '07 #1
2 4019
jhardman
3,405 Expert 2GB
I think that is an inbuilt IE problem. sorry.

Jared
Dec 21 '07 #2
trapax
1
basically you need to rewrite worksheet names avoiding :#/\%$ and other special characters
Jun 7 '11 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by Rajiv | last post: by
2 posts views Thread by Ian | last post: by
reply views Thread by dgoel | last post: by
9 posts views Thread by dba123 | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.