Link to home
Start Free TrialLog in
Avatar of Stewart Menzies
Stewart Menzies

asked on

Dotnet Error: using Excel = Microsoft.Office.Interop.Excel;

I'm getting an error on this line in a new console c# project:

using Excel = Microsoft.Office.Interop.Excel;

Severity      Code      Description      Project      File      Line      Suppression State
Error      CS0234      The type or namespace name 'Office' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)      excel1      E:\dotnet\excel1\excel1\Program.cs      2      Active

What do I need to be able to access excel spreadsheets from my console c# project.

Thanks in advance for any help.
Avatar of Stewart Menzies
Stewart Menzies

ASKER

I was able to add the office reference but not the interop assembly, though I did check the excel box in assemblies.
MissingInterop.png
Avatar of Chinmay Patel
It is Interop. C# is case sensitive.
ASKER CERTIFIED SOLUTION
Avatar of Chinmay Patel
Chinmay Patel
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks!