Reputation: 3
I currently making an inventory management system for thee company I am currently hired in. The system requires me to export data from DataGridView
to Excel. I have tried clicking "Add Reference" to my references in solution explorer and selecting Microsoft.Office.Interop.Excel
but after I click OK it still is not in my references. I tried it in my code but then I get this error:
Error CS0234 The type or namespace name 'Office' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
Upvotes: 0
Views: 601
Reputation: 48
It is not good to use this method. What if on somebody's computer there is not Excel? Try open source lib as EPPlus or as @Sagi mentioned Open XML
Upvotes: 1