ByteScout Spreadsheet SDK – VB.NET – Convert XLS to XML

  • Home
  • /
  • Articles
  • /
  • ByteScout Spreadsheet SDK – VB.NET – Convert XLS to XML

ByteScout Spreadsheet SDK – VB.NET – Convert XLS to XML

Module1.vb

Imports Bytescout.Spreadsheet
Imports System.IO
Imports System.Diagnostics

Module Module1

    Sub Main()
        Dim document As New Spreadsheet()
	document.LoadFromFile("SimpleReport.xls")

        ' remove output file if already exists
        If File.Exists("Output.xml") Then
            File.Delete("Output.xml")
        End If

        ' Save document
        document.Workbook.Worksheets(0).SaveAsXML("Output.xml")

        ' Close Spreadsheet
        document.Close()

        ' open in default spreadsheets viewer/editor
        Process.Start("Output.xml")

        document.Close()
    End Sub

End Module


  Click here to get your Free Trial version of the SDK

prev
next