Convert between XLS, XLSX, ODS, CSV and HTML files from your C#/VB.NET applications
The following example shows how you can convert your spreadsheets between XLS, XLSX, XLSB, ODS, CSV, XML and HTML file formats by using only the GemBox.Spreadsheet .NET component. You can do a basic conversion with just a few lines of code. You only need an IDE like Visual Studio or JetBrains Rider and .NET Framework, .NET Core, or any other platform that implements .NET Standard. Follow these steps to convert from one file format to another: You can test converting your Excel files with the interactive example below. Just upload your file, choose the output file format, click Run Example, and download the generated file. The C#/VB.NET code will be compiled, and your file will be converted with only .NET framework and the GemBox.Spreadsheet component. GemBox.Spreadsheet supports converting between the following file formats: For more details about supported file formats in GemBox.Spreadsheet, see the Supported File Formats help page.Steps for converting files
Convert Excel files online
using GemBox.Spreadsheet;
class Program
{
static void Main()
{
// If you are using the Professional version, enter your serial key below.
SpreadsheetInfo.SetLicense("FREE-LIMITED-KEY");
// Load Workbook from XLSX, XLS, ODS, CSV or HTML format
// and save it to XLSX, XLS, ODS, CSV, HTML, PDF, XPS or
// image (PNG, JPG, etc.).
ExcelFile.Load("%InputFileName%").Save("Convert.%OutputFileType%");
}
}
Imports GemBox.Spreadsheet
Module Program
Sub Main()
' If you are using the Professional version, enter your serial key below.
SpreadsheetInfo.SetLicense("FREE-LIMITED-KEY")
' Load Workbook from XLSX, XLS, ODS, CSV or HTML format
' and save it to XLSX, XLS, ODS, CSV, HTML, PDF, XPS or
' image (PNG, JPG, etc.).
ExcelFile.Load("%InputFileName%").Save("Convert.%OutputFileType%")
End Sub
End Module
Supported file formats