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

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

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

Module1.vb

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


Module Module1

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

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

        document.Workbook.Worksheets(0).SaveAsCSV("SimpleReport.csv")
        document.Close()

        ' open output document in default viewer
        Process.Start("SimpleReport.csv")

    End Sub

End Module


  Click here to get your Free Trial version of the SDK

prev
next