Results 1 to 6 of 6

Thread: Excel Automation

  1. #1
    Addicted Member
    Join Date
    Nov 11
    Posts
    155

    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

  2. #2
    PowerPoster
    Join Date
    Mar 02
    Location
    UK
    Posts
    4,030

    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.

  3. #3
    Addicted Member
    Join Date
    Nov 11
    Posts
    155

    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

  4. #4
    PowerPoster
    Join Date
    Mar 02
    Location
    UK
    Posts
    4,030

    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.

  5. #5
    PowerPoster kevininstructor's Avatar
    Join Date
    Jun 08
    Location
    Oregon
    Posts
    5,007

    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)

  6. #6
    Super Moderator RobDog888's Avatar
    Join Date
    Apr 01
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    59,465

    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 (VBA, VB 6, VB.NET, C#)
    Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Star Wars Gangsta Rap Reps & Rating PostsVS.NET on Vista (New)Multiple .NET Framework Versions (New)Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel Core 2 Extreme Ed., 2 WD Raptor 10K RPM 150 GB HDs RAID 1, 2 GBs DDR2 667 MHz RAM, 3 Viewsonic 17" LCDs, Windows Vista RTM, IE 7, Office 2007

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •