On this page you will learn from code samples for programming in VB.NET.Writing of the code to convert XLS to TXT in VB.NET can be done by developers of any level using ByteScout Spreadsheet SDK. ByteScout Spreadsheet SDK is the library (SDK) that is capable of writing, reading, modifying and calculating Excel and CSV spreadsheets. Most popular formulas can be calculated and reculculated with Excel installed. You may import or export data to and from CSV, XML, JSON as well as to and from databases, arrays. It can be used to convert XLS to TXT using VB.NET.
Fast application programming interfaces of ByteScout Spreadsheet SDK for VB.NET plus the instruction and the code below will help you quickly learn how to convert XLS to TXT. In order to implement the functionality, you should copy and paste this code for VB.NET below into your code editor with your app, compile and run your application. Test VB.NET sample code examples whether they respond your needs and requirements for the project.
You can download free trial version of ByteScout Spreadsheet SDK from our website to see and try many others source code samples for VB.NET.
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