3 Replies - 8615 Views - Last Post: 25 October 2012 - 07:47 AM Rate Topic: -----

#1 November-06   User is offline

  • D.I.C Regular

Reputation: 54
  • View blog
  • Posts: 482
  • Joined: 04-January 11

Microsoft.Office.Interop.Excel

Posted 24 October 2012 - 06:23 PM

I am using Microsoft.Office.Interop.Excel to save an excel workbook with multiple sheets. Problem is, when I published it in the server, I learned the there is no excel application installed in the server.

Google searches that I made all say that there should be an excel application installed in order to use Microsoft.Office.Interop.Excel so I am totally at a loss of how to proceed.

I am willing to redo the code if it is needed but maybe someone has an idea of how to make Microsoft.Office.Interop.Excel work without an excel application installed.

Maybe I could use a dll or something when deploying my web application?

Maybe there is a way to save an excel with multiple sheets without using Microsoft.Office.Interop.Excel?

I do not know where else to get advice so I am hoping someone from you guys could help.

Is This A Good Question/Topic? 0
  • +

Replies To: Microsoft.Office.Interop.Excel

#2 CoreFracture   User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 7
  • Joined: 25-January 12

Re: Microsoft.Office.Interop.Excel

Posted 24 October 2012 - 07:57 PM

Hiya!

As far as I understand (anyone please correct me) the Interop services actually "launch" the Office apps and interface with them, so unfortunately it would need to be installed.

As an alternative you could connect to the excel file via ADO methods.

-CoreFracture
Was This Post Helpful? 2
  • +
  • -

#3 chris.whitley   User is offline

  • New D.I.C Head
  • member icon

Reputation: 10
  • View blog
  • Posts: 39
  • Joined: 26-October 10

Re: Microsoft.Office.Interop.Excel

Posted 24 October 2012 - 09:43 PM

CoreFracture is correct. To use .Interop.Excel it does have to be installed and it does run the Excel Assembly. This isn't something you would really want to do server side, as running the Excel assembly uses more memory and CPU cycles.

The suggestion of ADO would be, in the long run, better and easier to manage vs Interop.
Was This Post Helpful? 0
  • +
  • -

#4 Curtis Rutland   User is offline

  • (╯□)╯︵ (~ .o.)~
  • member icon


Reputation: 5106
  • View blog
  • Posts: 9,283
  • Joined: 08-June 10

Re: Microsoft.Office.Interop.Excel

Posted 25 October 2012 - 07:47 AM

I believe you'd also need the ADO provider installed on the machine (either JET or ACE, depending on the version) if you wanted to use that. Simple answer is you'll probably need to have Office installed.

Actually, I found these redistributable libraries that you can use for data access in lieu of having Excel actually installed:

http://www.microsoft...s.aspx?id=13255
http://www.microsoft...s.aspx?id=23734

Pick whichever you need and install them on your server. Then you should be able to use ADO.NET to interact with Excel as if it were a database.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1