Shortcuts created on root
I have searched all over the newsgroups and have yet to find a resolution or
cause for this problem:
I know Microsoft states that they do not support Office automation on a
server but this is my problem, has anyone discovered the solution?
I have excel template files (.xlt) on my server. A webpage allows the user
to select a report which will then get a datareader with the correct data,
open the template file, insert the data, and save the file to a directory.
The web page then performs a response.redirect so the user can download the
file. Everything works great except for one hitch. For every file I create
I wind up with shortcuts to the file and the directory the file is located
in on the root of my webserver. This behavior does not occur on my
development box.
The dev box is running Windows XP Pro, the web server is Windows 2000
Server.
I have looked into the different options in Excel and have found nothing to
drive this behavior, the registry entries regarding most recently used files
seem to have no affect.
The code for opening the template and saving the file is as follows:
Dim xlBooks As Excel.Workbooks
Dim xlBook As Excel.Workbook
...
'create new workbook using a template file
xlBook = xlBooks.Add(String.Format("{}{}{}", mTemplatePath, "\",
mXLTemplate))
...
...
'save the resulting xls file
xlBook.SaveAs(FilePath)
I can hack together a solution that cleans up the shortcuts after they have
been created but I would much prefer preventing their creation. Anyone know
how?
Thanks
James Glover
Eastridge Technology
|