How to add Excel sheet to console application
Can any one explain the process of adding excel file in C# and What are the requirements for that?
Is it necessa开发者_JAVA技巧ry to install MS Excel in the system for using of Excel in C#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:
- Read an XLS file that has been created by Excel earlier.
- Write an XLS file that will be read by Excel later.
- Use the computational or solving facilities that Excel provides without actually using Excel.
You may get more useful answers if you clarify.
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
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.
精彩评论