Convert TSV to Excel in C#.NET
Tags: excel, aspose, csharp, tsv
Published: 2018-09-25 07:32:01

---
title: Convert TSV to Excel in C#.NET
published: true
description: This article explains how to convert TSV to Excel in C#.NET using Aspose.Cells API.
tags: #Excel #Aspose #Csharp #TSV
---

TSV file is an abbreviation of Tab-separated values. It is a type of **delimited text file**. A **delimiter** is a sequence of one or more characters to specify the boundary between separate, independent regions in plain text or other data streams. Since the delimiter in TSV file is **Tab** that separates fields in a row, therefore it is called Tab-separated values. [Aspose.Cells for .NET](https://products.aspose.com/cells/net) is capable of loading the TSV file and converting it to various Excel formats e.g. XLS, XLSX, XLSM, XLSB etc. It can also convert TSV file into non-Excel formats e.g. HTML, PDF etc. You can also convert your TSV file into Image formats e.g. JPG, PNG, TIFF etc.

# Convert TSV to Excel Formats

In this document, we will explain how to convert your TSV file into various Excel formats e.g. XLS, XLSX, XLSM, XLSB etc. Please [download the sample TSV file](https://github.com/AsposeCells/AsposeCells-Screenshots-and-Sample-Files/blob/master/TSV-to-Excel-Formats/sampleConvertTSVToExcelFormats.tsv) used inside the code as shown in this image for your reference.

![Sample TSV file to be converted to Excel formats using Aspose.Cells API](https://raw.githubusercontent.com/AsposeCells/AsposeCells-Screenshots-and-Sample-Files/master/TSV-to-Excel-Formats/Sample-TSV-file-to-be-converted-to-Excel-formats-using-Aspose.Cells-API.png)<center>
###### Sample TSV file to be converted to Excel formats using Aspose.Cells API</center>

## Convert TSV to XLS format

XLS is a very important Excel format. It is available since the Excel 2003 or may be earlier and still lots of Excel documents are saved in this format. XLS format is a sort of binary format and it can also contain Macros or VBA. Aspose.Cells which is an API provided by Aspose can convert your TSV file to XLS format using the following code.

{% gist https://gist.github.com/AsposeCells/d5401aefe48cf4a2ebee3958c96b916f %}

The following screenshot shows the [output XLS file generated by the above code](https://github.com/AsposeCells/AsposeCells-Screenshots-and-Sample-Files/blob/master/TSV-to-Excel-Formats/outputConvertTSVToExcelFormats.xls) for your reference.

![Convert TSV to XLS format using Aspose.Cells API](https://raw.githubusercontent.com/AsposeCells/AsposeCells-Screenshots-and-Sample-Files/master/TSV-to-Excel-Formats/Convert-TSV-to-XLS-format-using-Aspose.Cells-API.png)<center>
###### Convert TSV to XLS format using Aspose.Cells API
</center>

## Convert TSV to XLSX format

XLSX is a newer Microsoft Excel Open XML Format. It is kind of XML based format and stores the spreadsheet data in XML structures. It is widely used format since Excel 2007 and till today. Normally, you should save your Excel files in XLSX format rather than XLS format. Besides, **XLS can have at most 65536 rows while XLSX can have 1048576 rows** which is far greater than XLS. Similarly, **XLS can have 256 columns and XLSX can have 16384 columns** which is again far greater than XLS.

However, unlike XLS format, XLSX format cannot contain Macros or VBA. If you want to use XLSX format benefits and also want to use Macros or VBA, then you should use XLSM format which is actually a Macro-Enabled XLSX format. The following sample code explains how you can convert your TSV file to XLSX format using Aspose.Cells API.

{% gist https://gist.github.com/AsposeCells/34574fa729e188b90b7ff414202ce220 %}

The following screenshot shows the [output XLSX file generated by the above code](https://github.com/AsposeCells/AsposeCells-Screenshots-and-Sample-Files/blob/master/TSV-to-Excel-Formats/outputConvertTSVToExcelFormats.xlsx) for your reference.

![Convert TSV to XLSX format using Aspose.Cells API](https://raw.githubusercontent.com/AsposeCells/AsposeCells-Screenshots-and-Sample-Files/master/TSV-to-Excel-Formats/Convert-TSV-to-XLSX-format-using-Aspose.Cells-API.png)<center>
###### Convert TSV to XLSX format using Aspose.Cells API
</center>

## Convert TSV to XLSM format

XLSM format is same as XLSX but it supports VBA or Macros. It is therefore called Macro-Enabled XLSX format. The following sample code explains how you can convert your TSV file to XLSM format using Aspose.Cells API.

{% gist https://gist.github.com/AsposeCells/2ede50ab2810bf9ed4354c8725d29090 %}


The following screenshot shows the [output XLSM file generated by the above code](https://github.com/AsposeCells/AsposeCells-Screenshots-and-Sample-Files/blob/master/TSV-to-Excel-Formats/outputConvertTSVToExcelFormats.xlsm) for your reference.

![Convert TSV to XLSM format using Aspose.Cells API](https://raw.githubusercontent.com/AsposeCells/AsposeCells-Screenshots-and-Sample-Files/master/TSV-to-Excel-Formats/Convert-TSV-to-XLSM-format-using-Aspose.Cells-API.png)<center>
###### Convert TSV to XLSM format using Aspose.Cells API
</center>

## Convert TSV to XLSB format

XLSB format is same as XLSM format but unlike XML-based format, it is a binary format. Binary formats are often used to save the file size which is useful in scenarios where user needs to transfer files on network.

{% gist https://gist.github.com/AsposeCells/db180a0e5998776e81484543e7deae53 %}

The following screenshot shows the [output XLSB file generated by the above code](https://github.com/AsposeCells/AsposeCells-Screenshots-and-Sample-Files/blob/master/TSV-to-Excel-Formats/outputConvertTSVToExcelFormats.xlsb) for your reference.

![Convert TSV to XLSB format using Aspose.Cells API](https://raw.githubusercontent.com/AsposeCells/AsposeCells-Screenshots-and-Sample-Files/master/TSV-to-Excel-Formats/Convert-TSV-to-XLSB-format-using-Aspose.Cells-API.png)<center>
###### Convert TSV to XLSB format using Aspose.Cells API
</center>

# See also

* [Convert CSV to Excel in C#](https://medium.com/asposecells/convert-csv-to-excel-in-c-831afadc949)
* [Opening Files with Different Formats](https://docs.aspose.com/display/cellsnet/Opening+Files+with+Different+Formats)
* [Different Ways to Save Files](https://docs.aspose.com/display/cellsnet/Different+Ways+to+Save+Files)