3

I'm running Visual Studio 2010 Express, and in C# I'm trying to display Excel workbook.

I'm trying to use

Microsoft.Office.Interop.Excel

I have office 2007. Why doesn't this show up when I go to add> reference and navigate to the .NET or COM tabs?

Why doesn't this show up?

How can I add this as a reference or is there a better to show a workbook to the user in Excel?

2 Answers 2

3

For whatever reason VS 2010 doesn't like to show it in the .NET tab of the Add Reference window, you have to manually browse for it. The path to the assembly is C:\Windows\assembly\Microsoft.Office.Interop.Excel.

  1. Go to Add Reference
  2. Click on the Browse tab
  3. Browse to C:\windows\assembly
  4. Choose Microsoft.Office.Interop.Excel
Sign up to request clarification or add additional context in comments.

3 Comments

If you specify exactly what I'm looking for, I'll give you the credit of answering the question.
So why isn't this an issue in the Ultimate Edition?
See my edit (but maybe you already found it based on your edit). Don't know why Ultimate works but other editions don't. It worked fine in 2008, too...
0

I've had decent luck using EPPlus. It was awhile ago but I chose it since at the time the interop library was specific to a single version of Office whereas epplus was compatible with any version supporting the Open Office Xml format

4 Comments

There were a few odd bugs when I used it but it was the first decently-priced library I found.
None that are free? and @gleno, What are some better ones?
@wizlog aspose cells. best library so far. of course not free.
@wizlog, Aspose.Cells for .NET is much better. And if you don't consider $40 bux "free", then it's just a question of how much you value your time. A bug in EPPlus is that you can't (last time i checked 3 months ago) create an empty Excel file. I.e. if it's empty, then the library throws some silly exception. I'm arguing that it's worth paying a little for decent function, than to pay more in time trying to debug something that's free.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.