Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 41
Default Number gets added to filename

My web application generates an excel and sets a filename to the excel for
download. Sample file name is "aaa-09.02.2006-to-09.08.2006.xls". This is how
the code will show:
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition", "attachment;
filename="+fileName+";");
But when I try to download the excel from the application, excel opens /
saves the file as aaa-09[1].02.2006-to-09.08.2006.xls thereby inserting
numbers to the filename. I have tried the solutions given in the group like
setting the Excel "OPEN" as default,etc., but nothing seemed to work. Please
let me know how to force excel to retain the filename.
  #2   Report Post  
Posted to microsoft.public.excel.misc
RWN RWN is offline
external usenet poster
 
Posts: 104
Default Number gets added to filename

Just a shot in the dark, but;
Try getting rid of the period delimiters in the date (use a dash instead).


--
Regards;
Rob
------------------------------------------------------------------------
"ExcelUser" wrote in message
...
My web application generates an excel and sets a filename to the excel for
download. Sample file name is "aaa-09.02.2006-to-09.08.2006.xls". This is how
the code will show:
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition", "attachment;
filename="+fileName+";");
But when I try to download the excel from the application, excel opens /
saves the file as aaa-09[1].02.2006-to-09.08.2006.xls thereby inserting
numbers to the filename. I have tried the solutions given in the group like
setting the Excel "OPEN" as default,etc., but nothing seemed to work. Please
let me know how to force excel to retain the filename.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Number gets added to filename

Any chance it's the web application that's noticing that there's an existing
file with that name, so it decides to make a unique filename????

ExcelUser wrote:

My web application generates an excel and sets a filename to the excel for
download. Sample file name is "aaa-09.02.2006-to-09.08.2006.xls". This is how
the code will show:
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition", "attachment;
filename="+fileName+";");
But when I try to download the excel from the application, excel opens /
saves the file as aaa-09[1].02.2006-to-09.08.2006.xls thereby inserting
numbers to the filename. I have tried the solutions given in the group like
setting the Excel "OPEN" as default,etc., but nothing seemed to work. Please
let me know how to force excel to retain the filename.


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 41
Default Number gets added to filename

I don't think so since the problem exists even when I try to open a file
which does not exist already.

"Dave Peterson" wrote:

Any chance it's the web application that's noticing that there's an existing
file with that name, so it decides to make a unique filename????

ExcelUser wrote:

My web application generates an excel and sets a filename to the excel for
download. Sample file name is "aaa-09.02.2006-to-09.08.2006.xls". This is how
the code will show:
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition", "attachment;
filename="+fileName+";");
But when I try to download the excel from the application, excel opens /
saves the file as aaa-09[1].02.2006-to-09.08.2006.xls thereby inserting
numbers to the filename. I have tried the solutions given in the group like
setting the Excel "OPEN" as default,etc., but nothing seemed to work. Please
let me know how to force excel to retain the filename.


--

Dave Peterson

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Number gets added to filename

I would think that excel wouldn't be doing anything but opening a file stored on
a disk somewhere. I've never seen it change the name of a file when opening it.

But I don't speak the web stuff.

You may want to ask in a forum dedicated to whatever language your web
application is written?????

ExcelUser wrote:

I don't think so since the problem exists even when I try to open a file
which does not exist already.

"Dave Peterson" wrote:

Any chance it's the web application that's noticing that there's an existing
file with that name, so it decides to make a unique filename????

ExcelUser wrote:

My web application generates an excel and sets a filename to the excel for
download. Sample file name is "aaa-09.02.2006-to-09.08.2006.xls". This is how
the code will show:
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition", "attachment;
filename="+fileName+";");
But when I try to download the excel from the application, excel opens /
saves the file as aaa-09[1].02.2006-to-09.08.2006.xls thereby inserting
numbers to the filename. I have tried the solutions given in the group like
setting the Excel "OPEN" as default,etc., but nothing seemed to work. Please
let me know how to force excel to retain the filename.


--

Dave Peterson


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Number gets added to filename

If you create a new workbook based on a template named myTemplate (say), you'll
end up with workbooks named:
myTemplate1
myTemplate2
....
myTemplateN

It won't put those numbers in brackets [] and the number appears at the end of
the name.

And there won't be an extension for this newly created file until the workbook
is saved (no .xls until it's saved).

And just to head off another possibility, if the file has multiple windows,
you'll see:

myBook1.xls:1
and
myBook1.xls:2

(note the colon and then the number)

Rookie 1st class wrote:

Is it a template? If you open a second with the first open does it become
*[2]*?

"Dave Peterson" wrote:

I would think that excel wouldn't be doing anything but opening a file stored on
a disk somewhere. I've never seen it change the name of a file when opening it.

But I don't speak the web stuff.

You may want to ask in a forum dedicated to whatever language your web
application is written?????

ExcelUser wrote:

I don't think so since the problem exists even when I try to open a file
which does not exist already.

"Dave Peterson" wrote:

Any chance it's the web application that's noticing that there's an existing
file with that name, so it decides to make a unique filename????

ExcelUser wrote:

My web application generates an excel and sets a filename to the excel for
download. Sample file name is "aaa-09.02.2006-to-09.08.2006.xls". This is how
the code will show:
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition", "attachment;
filename="+fileName+";");
But when I try to download the excel from the application, excel opens /
saves the file as aaa-09[1].02.2006-to-09.08.2006.xls thereby inserting
numbers to the filename. I have tried the solutions given in the group like
setting the Excel "OPEN" as default,etc., but nothing seemed to work. Please
let me know how to force excel to retain the filename.

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson
  #7   Report Post  
Posted to microsoft.public.excel.misc
RWN RWN is offline
external usenet poster
 
Posts: 104
Default Number gets added to filename

Not an expert, but I still think the problem is with the periods imbedded in the name,
specifically the 1st one.
It is probably treating the rest of the name, after the 1st period, as an extension.
Hence the addition of the copy # after the "aaa-09[1]"

--
Regards;
Rob
------------------------------------------------------------------------
"Dave Peterson" wrote in message
...
Any chance it's the web application that's noticing that there's an existing
file with that name, so it decides to make a unique filename????

ExcelUser wrote:

My web application generates an excel and sets a filename to the excel for
download. Sample file name is "aaa-09.02.2006-to-09.08.2006.xls". This is how
the code will show:
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition", "attachment;
filename="+fileName+";");
But when I try to download the excel from the application, excel opens /
saves the file as aaa-09[1].02.2006-to-09.08.2006.xls thereby inserting
numbers to the filename. I have tried the solutions given in the group like
setting the Excel "OPEN" as default,etc., but nothing seemed to work. Please
let me know how to force excel to retain the filename.


--

Dave Peterson



  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 41
Default Number gets added to filename

I have changed the filename format and there is no period in the file name now.
Now when I click "Open" in the Open/Save dialog window, the excel file opens
as
aaa-09-02-2006-to-09-08-2006[1].xls. The file opens in the Temporary
Internet Files/Content.IE5/<some folder name.

"RWN" wrote:

Not an expert, but I still think the problem is with the periods imbedded in the name,
specifically the 1st one.
It is probably treating the rest of the name, after the 1st period, as an extension.
Hence the addition of the copy # after the "aaa-09[1]"

--
Regards;
Rob
------------------------------------------------------------------------
"Dave Peterson" wrote in message
...
Any chance it's the web application that's noticing that there's an existing
file with that name, so it decides to make a unique filename????

ExcelUser wrote:

My web application generates an excel and sets a filename to the excel for
download. Sample file name is "aaa-09.02.2006-to-09.08.2006.xls". This is how
the code will show:
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition", "attachment;
filename="+fileName+";");
But when I try to download the excel from the application, excel opens /
saves the file as aaa-09[1].02.2006-to-09.08.2006.xls thereby inserting
numbers to the filename. I have tried the solutions given in the group like
setting the Excel "OPEN" as default,etc., but nothing seemed to work. Please
let me know how to force excel to retain the filename.


--

Dave Peterson




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
Comparing Data from two 2 worksheets Roberto R Excel Discussion (Misc queries) 17 December 2nd 06 02:58 PM
Detecting Cancel in an InputBox Method Connie Excel Discussion (Misc queries) 2 October 19th 06 01:32 PM
Changing a Number in a Column Using Arrays [email protected] Excel Worksheet Functions 3 September 12th 06 02:48 PM
Pulling Data off Web - Need Function Help patfergie44 Excel Worksheet Functions 9 June 22nd 06 03:27 AM
The number 1 is appened to filename after file is opened JohnS Excel Discussion (Misc queries) 2 September 7th 05 02:56 PM


All times are GMT +1. The time now is 05:03 AM.

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

About Us

"It's about Microsoft Excel"