Following example shows how to read XLS, XLSX, ODS and CSV 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 reads Excel file (in XLS format) and shows messageBox with value from cell “A1″:
// Load Excel file.
var workbook = ExcelFile.Load("Workbook.xls");
// Select active worksheet.
var worksheet = workbook.Worksheets.ActiveWorksheet;
// Display the value of first cell in MessageBox.
Visual Basic .NET code:
' Load Excel file.
Dim workbook = ExcelFile.Load("Workbook.xls")
' Select active worksheet.
Dim worksheet = workbook.Worksheets.ActiveWorksheet
' Display the value of first cell in MessageBox.
For a more detailed example, see Reading sample from GemBox.Spreadsheet Sample Explorer.