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

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

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

Module1.vb

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

Module Module1

    Sub Main()
        ' Create new Spreadsheet from SimpleReport.xls file
        Dim document = New Spreadsheet()
        document.LoadFromFile("SimpleReport.xls")

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

        ' Save into TXT file
        document.Workbook.Worksheets(0).SaveAsTXT("Output.txt")


        ' Close Spreadsheet
        document.Close()

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

    End Sub

End Module


  Click here to get your Free Trial version of the SDK

prev
next