From: abb on
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.
From: Mark Rae [MVP] on
"abb" <andrewbb(a)gmail.com> wrote in message
news:343bef99-65fa-4cd5-9643-aac8c6bdc833(a)w1g2000prk.googlegroups.com...

> 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-and-java/default.aspx


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

From: Joern Schou-Rode on
On Sun, 20 Jul 2008 10:08:28 +0200, Mark Rae [MVP]
<mark(a)marknospamrae.net> wrote:

> 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-and-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/
From: Mark Rae [MVP] on
"Joern Schou-Rode" <jsr(a)malamute.dk> wrote in message
news:op.uelu6oyl31zpn8(a)marvin...

> 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...?


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

From: ZSvedic on
On Jul 20, 8:07 am, abb <andre...(a)gmail.com> wrote:
> 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 OfficeExcelcannot 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 forExcel
>
> 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.

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
 |  Next  |  Last
Pages: 1 2
Prev: Ajax Toolkit - My brain hurts
Next: Best DAL Generator?