2
How to Use C#/VB.Net Convert Excel to XML Why Convert Excel to XML? As a document text format used in documents that define structured data, XML (Extensible Markup Language) is highly portable between applications. Because specialized in simplicity, generality, and usability over the Internet, XML has strong support via Unicode for the languages of the world. So, sometimes you may want to convert a spreadsheet in an XLS workbook into XML to take advantage of this portability. How to Use C#/VB.Net Convert Excel to XML? Spire.XLS for .NET is .NET Excel component which enables your .NET applications fast generate, read, write and modify Excel document without Microsoft Office Excel Automation. Through Spire.XLS, we can use C#/VB.NET convert Excel to XML effortlessly. Download Spire.XLS for .NET (or Spire.Office ) with .NET Framework 2.0 (or above) together. In your application add Spire.XLS reference, with the code below, you can convert Excel to XML effortlessly. C# Convert Excel to XML: [C#] 01 using Spire.Xls; 02 namespace Xls2Xml 03 04 { 05 class Program 06 { 07 static voidMain(string[] args) 08 { 09 Workbook workbook = new Workbook(); 10 workbook.LoadFromFile(".../.../Data/test.xls"); 11 workbook.SaveAsXml("sample.xml"); 12 } 13 } 14 } VB.NET Convert Excel to XML: [Visual Basic]

C#/VB.NEt Excel to xml

Embed Size (px)

Citation preview

Page 1: C#/VB.NEt Excel to xml

How to Use C#/VB.Net Convert Excel to XML

Why Convert Excel to XML?

As a document text format used in documents that define structured data, XML (Extensible Markup Language) is highly portable between applications. Because specialized in simplicity, generality, and usability over the Internet, XML has strong support via Unicode for the languages of the world. So, sometimes you may want to convert a spreadsheet in an XLS workbook into XML to take advantage of this portability.

How to Use C#/VB.Net Convert Excel to XML?

Spire.XLS for .NET is .NET Excel component which enables your .NET applications fast generate, read, write and modify Excel document without Microsoft Office Excel Automation. Through Spire.XLS, we can use C#/VB.NET convert Excel to XML effortlessly.

Download Spire.XLS for .NET (or Spire.Office) with .NET Framework 2.0 (or above) together. In your application add Spire.XLS reference, with the code below, you can convert Excel to XML effortlessly.

C# Convert Excel to XML:[C#]01 using Spire.Xls;02 namespace Xls2Xml03 04 {05 class Program06 {07 static voidMain(string[] args)08 {09 Workbook workbook = new Workbook();10 workbook.LoadFromFile(".../.../Data/test.xls");11 workbook.SaveAsXml("sample.xml");12 }13 }14 }

VB.NET Convert Excel to XML:[Visual Basic]01 Imports Spire.Xls02 Namespace Xls2Xml03 Friend Class Program04 Shared Sub Main(ByVal args() As String)05 Dim workbook As New Workbook()

Page 2: C#/VB.NEt Excel to xml

06 workbook.LoadFromFile("Sample.xls")07 workbook.SaveAsXml("sample.xml")08 End Sub09 End Class10 End Namespace11

Furthermore, with Spire.XLS you can also do some additional jobs such as add background cell color and so on.

More about Spire.XLSDownload Spire.XLSPurchase Spire.XLS