Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Wednesday, November 13, 2019 9:06 AM
Hi Experts
I have Visual Studio 2017 and Office 365 Installed. I want to create a Windows form application to create an excel file. But unfortunately i don't have any references to excel in - Project - Add Reference. Help please. How/Where can I download the necessary component to create an excel file.
Thanks
manish
All replies (4)
Wednesday, November 13, 2019 10:05 AM
Hi manish,
Could you provide your code and reference you added?
# I would like to recommend to use "ClosedXML" for handling Excel in your project.
Please refer to this article about "ClosedXML".
Regards,
Ashidacchi -- http://hokusosha.com
Wednesday, November 13, 2019 10:20 AM
Hi BlManish,
Welcome to MSDN forum.
The library is a part of office installation, you need to install Microsoft Excel client on your machine.
My environment: Excel 2016 -> Microsoft Excel 16.0 Object Library. the 15.0 is corresponding to Excel 2013
Best Regards,
Dylan
MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com
Wednesday, November 13, 2019 11:32 AM
Hi Ashidacchi.
I don't have any code. I need to add reference before I write. If I manage the following I am good to go!
Excel.Application xlApp = new
Microsoft.Office.Interop.Excel.Application();
i think i need the Office.Interop
However your suggestion for using the ClosedXML looks promising. Thanks
Regards
Manish
Wednesday, November 13, 2019 12:22 PM
Hi Manish,
I may be able to understand your situation.
You need to
1) add Microsoft.Office.Interop.Excel.dll in your project
2) [C#] using Excel = Microsoft.Office.Interop.Excel;
[VB.NET]Imports Microsoft.Office.Interop
1) your project > [References] > [Add] > (on the left pane) [COM] --
-- check like this (Microsoft Excel 16.0 Object Library and Microsoft Office 16.0 Object Library)
Regards,
Ashidacchi -- http://hokusosha.com