How to add Excel sheet to console application

前端 未结 3 1789
抹茶落季
抹茶落季 2021-01-29 15:35

Can any one explain the process of adding excel file in C# and What are the requirements for that?
Is it necessary to install MS Excel in the system for using of Excel in C#

相关标签:
3条回答
  • 2021-01-29 16:13

    You can read data from Excel spreadsheet without having Excel installed, using ADO.Net. Here is a sample for how to do this.

    However, your question is a little vague. Since you do not have Excel installed, which of these do you really want to do:

    1. Read an XLS file that has been created by Excel earlier.
    2. Write an XLS file that will be read by Excel later.
    3. Use the computational or solving facilities that Excel provides without actually using Excel.

    You may get more useful answers if you clarify.

    0 讨论(0)
  • 2021-01-29 16:16

    From past experience I would suggest you use a dedicated component like Gembox or Aspose Cells for this purpose. Besides it being more straightforward, you don't need to have Excel installed and you won't have deployment and licensing issues.

    0 讨论(0)
  • 2021-01-29 16:32

    SpreadsheetGear for .NET will let you use Excel files in any .NET application (Console app, WinForms, ASP.NET, etc...) without having Excel installed.

    You can see live samples here and download the free trial here.

    Disclaimer: I own SpreadsheetGear LLC

    0 讨论(0)
提交回复
热议问题