The following example shows how to read XLS, XLSX, ODS, CSV, and HTML files by using only the GemBox.Spreadsheet for Java component.
GemBox.Spreadsheet for Java is a component that provides a simple and efficient way to read, write, and convert native Microsoft Excel (XLSX, XLS) and other spreadsheet (ODS, CSV, TAB) formats and various document formats (HTML, TXT) from Java applications without the need for Microsoft Excel on either the developer or client machines.
GemBox.Spreadsheet for Java Free is free of charge, while GemBox.Spreadsheet for Java Professional is a commercial version that is licensed per developer.
The example below reads an Excel file (in XLSX format) and shows the “A1” cell’s value from an active sheet:
// Load Excel file. ExcelFile workbook = ExcelFile.load("Workbook.xlsx"); // Get active worksheet. ExcelWorksheet worksheet = workbook.getWorksheets().getActiveWorksheet(); // Get first cell. ExcelCell cell = worksheet.getCell("A1"); // Read and display the value of first cell. System.out.println(cell.getValue());
GemBox.Spreadsheet for Java Free delivers the same performance and set of features as the Professional version. However, the Free version is limited to 150 rows per sheet. You can use the free version for any purpose, including commercial applications.
If you want to see how fast and efficient GemBox.Spreadsheet for Java performs for large files, you can enable Trial mode right from within the free version.
GemBox.Spreadsheet for Java is a standalone component for fast reading, writing, editing and converting of XLSX, XLS, ODS, CSV, TAB and HTML files with one simple API.