开发者

Excel to XML in .NET3.5

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 con开发者_如何学运维vert to standard xml format


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


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 depends on your requirement what method is effective for you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜