Results 1 to 6 of 6

Thread: Excel Automation

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2011
    Posts
    178

    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 2002
    Location
    UK
    Posts
    4,780

    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

    Thread Starter
    Addicted Member
    Join Date
    Nov 2011
    Posts
    178

    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 2002
    Location
    UK
    Posts
    4,780

    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
    Karen Payne MVP kareninstructor's Avatar
    Join Date
    Jun 2008
    Location
    Oregon
    Posts
    6,713

    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
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    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 PostsVS.NET on Vista Multiple .NET Framework Versions 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 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
  •  



Click Here to Expand Forum to Full Width