Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat (if there are any) are the (free) alternatives to COM interop with MS Excel using .NET?
    text
    copied!<p>Background: I'm trying to make a decision on whether to go down the road of automating Excel using C# via Interop. I'm certainly not a VBA guy and for numerous reasons, I'd prefer not to go down that road. I don't know much about other options, and I'm really not looking to buy anything.</p> <p>Performance is massively important.</p> <p>I've tried to find references on using Interop to automate Excel and it seems rather sparse. Some of the better stuff is <a href="http://rads.stackoverflow.com/amzn/click/0735621322" rel="nofollow">dated</a> and other references just don't cover a lot of the material. Many folks cite the fact that a lot of the existing material spends time focusing on differences in version of MS Office. I'm also wondering whether the improvements that have been claimed with moving to .NET 4 are material.</p> <p>Edit: The crux of what I'm trying to accomplish is complete automation of fairly involved and intricate formatting as well as some pretty heavy analysis (linear regression). I need to chart data once analyzed/calculated and the chart formatting is really important because the MBA's I work with say it is. I guess all of this is possible via VBA but I don't know for sure because I'm not a VBA guy. Think macro type stuff with the app hidden so it's running as a background process. Performance is critical (one of the reasons I question COM's appropriateness). VBA may even be off the table due to its performance considerations.</p> <p>Now, for the question.</p> <p>The best way I can ask this succinctly is: <strong>is there a laundry list of stuff you can't do with Interop in Excel that you'd like to be able to do</strong>? How have you gotten around it in your development experiences?</p> <p>If there really isn't anything you can't do with Interop (see comments below) and it's the best fit for what I'm intending to do, <strong>what is the best way to go about learning to use it</strong> given that COM and the Excel object model can be a fairly intimidating undertaking. Are there really good references out there?</p> <p>If there's a better way for me to go about the above, can you tell me about it? Excel DNA was mentioned but I can't see it being much more helpful than allowing the creation of user-defined C# functions that can get to a backend server app or database somewhere.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload