How to convert Excel document into text (.txt) file using Bytescout Spreadsheet SDK
This source code sample shows how to convert excel XLS document into text file (.txt) using Bytescout Spreadsheet SDK with C# in .NET
Download example source code: bytescoutxls_converting_xls_to_txt.zip (8 KB)
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using Bytescout.Spreadsheet;
namespace Converting_XLS_to_TXT
{
class Program
{
static void Main(string[] args)
{
// Create new Spreadsheet from SimpleReport.xls file
Spreadsheet document = new Spreadsheet(“SimpleReport.xls”);
// delete output file if exists already
if (File.Exists(“SimpleReport.txt”)){
File.Delete(“SimpleReport.txt”);
}
// save into TXT
document.Workbook.Worksheets[0].SaveAsTXT(“SimpleReport.txt”);
}
}
}
Download example source code: bytescoutxls_converting_xls_to_txt.zip (8 KB)