Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / July 2008

Tip: Looking for answers? Try searching our database.

Microsoft Office Excel cannot access the file (IIS7)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
abb - 20 Jul 2008 07:07 GMT
On a Vista machine, the following code works using the ASP.NET
Development Server, but fails in IIS7:

book = excel.Workbooks.Open(tempfile,
            false, false, Missing.Value,
            Missing.Value, Missing.Value, Missing.Value,
Missing.Value,

In IIS7, the error is "Microsoft Office Excel cannot access the
file ... There are several possible reasons:
• The file name or path does not exist.
• The file is being used by another program.
• The workbook you are trying to save has the same name as a currently
open workbook."

Both NETWORK SERVICE and IUSR have:
- read/write permissions on the temp folder
- Launch, Access, and Configuration permissions in DCOM Config for
Excel

I've also tried running the IIS application as my local adminstrator
account, but the same error occurs.  It's IIS7 specific.  What
permission does it need?  Any ideas?  Thanks.
Mark Rae [MVP] - 20 Jul 2008 09:08 GMT
> Any ideas?

Yes, but you're not going to like them...

Server-side Office Automation is not recommended by Microsoft, nor is it
supported, for the simple reason that it doesn't work properly.

Microsoft Office simply wasn't designed to be run in this type of
architecture. See the following KB articles:
http://support.microsoft.com/default.aspx/kb/288367
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2

If you simply need to treat an Excel spreadsheet as a datasource, you can
use ADO.NET just like with any other database.

For any other usage, there is really only one solution which is guaranteed
to work:
http://www.aspose.com/categories/file-format-components/aspose.cells-for-.net-an
d-java/default.aspx


Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

Joern Schou-Rode - 20 Jul 2008 20:31 GMT
> For any other usage, there is really only one solution which is  
> guaranteed to work:
> http://www.aspose.com/categories/file-format-components/aspose.cells-for-.net-an
d-java/default.aspx

If you do not need anything fancy, you might be able to do with this free,  
open-source library:
http://myxls.in2bits.org/

If you do need the fancy stuff, Aspose is the way to go.

--
Joern Schou-Rode
http://malamute.dk/
Mark Rae [MVP] - 20 Jul 2008 22:02 GMT
> If you do not need anything fancy, you might be able to do with this free,
> open-source library: http://myxls.in2bits.org/

I've not seen that before - is it fairly new...?

I do understand that Aspose is simply too expensive for some potential
users, so this might be an excellent free alternative. Do you have any
experience with it...?

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

Tim Erickson - 24 Jul 2008 16:31 GMT
The latest release (from July 9 - 2 weeks ago) will also do basic read
operations as well as write.  It's not so new, but not getting any
Google-juice.  It's my project on SourceForge.

> > you might be able to do with this free,
> > open-source library: http://myxls.in2bits.org/
[quoted text clipped - 4 lines]
> users, so this might be an excellent free alternative. Do you have any
> experience with it...?
ZSvedic - 21 Jul 2008 15:44 GMT
> On a Vista machine, the following code works using the ASP.NET
> Development Server, but fails in IIS7:
[quoted text clipped - 18 lines]
> account, but the same error occurs.  It's IIS7 specific.  What
> permission does it need?  Any ideas?  Thanks.

I agree with Mark that there are many automation issues on the server:
http://www.gemboxsoftware.com/GBSpreadsheet.htm#Automation
Except previously mentioned myxls and Aspose.Cells, you can try our
free Excel R/W component: http://www.gemboxsoftware.com/GBSpreadsheetFree.htm
If you have XLS/CSV/XLSX files smaller that 150 rows it is free of
charge, otherwise it is $425 per developer (one time fee).
--Zeljko

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.