-
Excel Automation
Hi Everyone,
I am doing some excel automation where I am generating several excel sheets. On my developer machine, I have excel 2010 installed. So I am trying out on a client machine with excel viewer installed only. I am getting the error below.
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Office.Interop.Excel, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.Office.Interop.Excel, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'
Do i have to install excel to have this component installed? or can i get it from elsewhere?
Thanks to advise.
Ashley
-
Re: Excel Automation
The interop actually opens Excel up in the background to do your tasks, have a look in taskmanager to see this. There are alternative controls that do this (SpreadSheetGear/Apose), so Excel does not have to be installed, but each would have its own drawbacks and cost.
-
Re: Excel Automation
Thanks for the reply. Seems we have to purchase. Is there something free that I can try? Thanks for your time.
Regards,
Ashley
-
Re: Excel Automation
Personally I use SpreadSheetGear which has a 30 day eval, as the cost is less than others I had seen. It has been missing some items such as 3D charts, and a few 2010 formula's (formule?), which are being added in future versions. I have no idea if others have or do not have some of these features.
-
Re: Excel Automation
I went with Aspose Cells because I had used their PDF Kit which is an excellent library. Aspose offers a 30 day eval and if that is not enough they will extend that for you. All my projects that use Aspose read from a config file to set what version of Excel to save data too rather than hard-code it. Excel is not required to work with Excel files via Aspose.
Another options is to embed several Interop DLL into your app if using VS2010 or higher.
Walkthrough: Embedding Type Information from Microsoft Office Assemblies (C# and Visual Basic)
MSDN Search
VS2010 Enhancements (see item 9)
-
Re: Excel Automation
Info on a PIA - http://msdn2.microsoft.com/en-us/library/aa302338.aspx
More info and PIA redistrbutable downloads - http://www.vbforums.com/showthread.php?t=422689
You also could use Late Binding and only invoke functions and properties that are supported between the versions you wish to support. However if you embed the PIA's in your application like the link posted earlier then you also wouldnt have the error.