tags:

views:

334

answers:

3

hi

Can any one explain the process of adding excel file in c sharp... and What are the requirements for that..and IS it necessary to install MS Excel in the system for using of Excel in C sharp

+2  A: 

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.

Tarydon
WIth out using ADO.NET
srinivas Reddy
Any particular reason not to use ADO.NET? It is always available (if the .Net framework is installed).
Tarydon
You cannot use Excel interop unless you have Excel installed on your system. ADO.NET seems to be the only way to go unless you want to develop a module to read the Excel file's format. There may be some third-party controls available to read Excel data.
A9S6
A: 

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.

Conrad
+1  A: 

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

Joe Erickson