|
-
Jul 3rd, 2012, 05:11 AM
#1
Thread Starter
Addicted Member
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
-
Jul 3rd, 2012, 05:58 AM
#2
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.
-
Jul 3rd, 2012, 06:09 AM
#3
Thread Starter
Addicted Member
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
-
Jul 3rd, 2012, 06:35 AM
#4
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.
-
Jul 3rd, 2012, 09:34 AM
#5
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)
-
Jul 3rd, 2012, 11:46 AM
#6
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.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|