How to Convert between XLS, XLSX, ODS, CSV and HTML files from your .NET applications?

Following example shows how to convert between XLS, XLSX, ODS, CSV and HTML files by using only GemBox.Spreadsheet .NET component.

GemBox.Spreadsheet is a C# / VB.NET component which provides simple and efficient way to read, write, convert and print native Microsoft Excel (XLSX, XLS) and other spreadsheet (ODS, CSV) formats and various document formats (HTML, PDF, XPS) from .NET applications without the need for Microsoft Excel on either the developer or client machines.
GemBox.Spreadsheet Free is free of charge while GemBox.Spreadsheet Professional is a commercial version licensed per developer.
For more information, see GemBox.Spreadsheet features and why GemBox.Spreadsheet outperforms Excel automation.

Example loads input file from specified input format (XLS, XLSX, ODS, CSV or HTML) and saves it to output file in specified output format (XLS, XLSX, CSV, ODS, HTML, PDF, XPS or image):

C# code:

// 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(Path.ChangeExtension("Workbook", inputFileFormat)).
Save(Path.ChangeExtension("Workbook", outputFileFormat));

Visual Basic .NET code:

' 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(Path.ChangeExtension("Workbook", inputFileFormat)).
Save(Path.ChangeExtension("Workbook", outputFileFormat))

For a more detailed example, see Convert sample from GemBox.Spreadsheet Sample Explorer.