Does XlsIO support TSV files?
This article explains whether XlsIO supports TSV files.
Does XlsIO support TSV files?
XlsIO does support opening and saving of TSV files from assembly version 14.1 onwards. XlsIO does not need a string separator for opening TSV files.
Download input files with data
The following C#/VB complete code snippet explains the support of TSV files by XlsIO
C#
using Syncfusion.XlsIO; using System.IO; using System.Reflection; namespace XlsIO_Supports_TSV { class Program { static void Main(string[] args) { using (ExcelEngine excelEngine = new ExcelEngine()) { // Instantiate the excel application object. IApplication application = excelEngine.Excel; // The workbook is opened. IWorkbook workbook; // Open existing workbook with data entered Assembly assembly = typeof(Program).GetTypeInfo().Assembly; Stream fileStream = assembly.GetManifestResourceStream("XlsIO_Supports_TSV.Sample.xlsx"); workbook = application.Workbooks.Open(fileStream, ExcelOpenType.Automatic); // The first worksheet object in the worksheets collection is accessed. IWorksheet worksheet = workbook.Worksheets[0]; // Saving the workbook as TSV file Stream stream = File.Create("Output.tsv"); workbook.SaveAs(stream, "\t"); stream.Close(); // Re-Opening the saved TSV file workbook = application.Workbooks.Open("Output.tsv"); // Saving the workbook as xlsx file stream = File.Create("Output.xlsx"); workbook.SaveAs(stream); } } } }
VB
Imports Syncfusion.XlsIO Imports System.IO Imports System.Reflection Namespace XlsIO_Supports_TSV Class Program Private Shared Sub Main(ByVal args() As String) Using excelEngine As ExcelEngine = New ExcelEngine() 'Instantiate the excel application object. Dim application As IApplication = excelEngine.Excel 'The workbook is opened. Dim workbook As IWorkbook 'Open existing workbook with data entered Dim assembly As Assembly = GetType(Program).GetTypeInfo.Assembly Dim fileStream As Stream = assembly.GetManifestResourceStream("XlsIO_Supports_TSV.Sample.xlsx") workbook = application.Workbooks.Open(fileStream, ExcelOpenType.Automatic) 'The first worksheet object in the worksheets collection is accessed. Dim worksheet As IWorksheet = workbook.Worksheets(0) 'Saving the workbook as TSV file Dim stream As Stream = File.Create("Output.tsv") workbook.SaveAs(stream, "" & vbTab) stream.Close() 'Re-Opening the saved TSV file workbook = application.Workbooks.Open("Output.tsv") 'Saving the workbook as xlsx file stream = File.Create("Output.xlsx") workbook.SaveAs(stream) End Using End Sub End Class End Namespace
Take a moment to peruse the documentation where you can find basic Excel document processing options along with the features like import and export data, chart, formulas, conditional formatting, data validation, tables, pivot tables and, protect the Excel documents, and most importantly, the PDF, CSV and Image conversions with code examples.
Conclusion
I hope you enjoyed learning about Does XlsIO support TSV files.
You can refer to our XIsIO’s feature tour page to learn about its other groundbreaking features. Explore our UG documentation and online demos to understand how to manipulate data in Excel documents.
If you are an existing user, you can access our latest components from the License and Downloads page. For new users, you can try our 30-day free trial to check out XlsIO and other Syncfusion® components.
If you have any queries or require clarification, please let us know in the comments below or contact us through our support forums, Support Tickets, or feedback portal. We are always happy to assist you!