tags:

views:

65

answers:

2

How to convert Excel file to xml file using .NET framework 3.5

Please tell the approaches

The format of excel sheet is xls and convert to standard xml format

+1  A: 

SpreadsheetGear for .NET will let you open a workbook (xls or xlsx format), get the formatted text (such as $5.00) with the IRange.Text property or the unformatted raw value with the IRange.Value property. You can also modify values and recalculate if needed. You would need to use the .NET XML APIs to write out the formatted text or unformatted values to an XML file.

You can download a free trial here if you want to try it yourself.

Disclaimer: I own SpreadsheetGear LLC

Joe Erickson
+1  A: 

You can do it in various ways based on your requirement 1. You can read it like a database using OleDbConnection object to connect to the file and read data 2. You can use System.IO.Packaging to read office 2007 (xlsx )files 3. You can also use Excel.Application object model to read information from excel

It really repends on your requirement what method is effective for you.

Krishna Prasad