EasyXLS

Import XLSX file in .NET, Java and other programming languages

EasyXLS™ library allows you to import data from an XLSX file or other sheet elements like cell formatting, charts, pivot tables, comments, images and others.

EasyXLS can be successfully used to also import large XLSX files having big volume of data with fast importing time.

EasyXLS allows loading an XLSX document. Once the XLSX is loaded in memory, the user can process data, add more features to the file (like formulas, cell formatting, comments, hyperlinks, images, data validations, page setup, charts, etc), and save the file back in XLSX format or other format (XLS, XLSB, XML Spreadsheet, XML, TXT, CSV or HTML).
It can be used to load an already formatted XLSX file as a template, add data and save back the file in XLSX format. In this way, a lot of written code that formats the XLSX file can be avoided.

EasyXLS permits you to import Excel files without Excel installed, without Interop, without OLEDB or any other additional software installed.

Import entire XLSX file

The below source code sample is a common code about how to import an XLSX file. The source code shows how to load and import an XLSX file that is used as a base template, add more data to the XLSX file and save the new workbook.
After that, the best techniques about importing data from XLSX file like importing Excel data to DataTable, GridView, DataGridView, DataSet, ResultSet, DataGrid and List are shown.

C#.NET
VB.NET
C++
Java
PHP
ASP
VB6
VBS
Coldfusion
Python

The screen shots below provide an example of the imported XLSX file, modified and saved back to another XLSX file. The file has two worksheets (First Tab and Second Tab). The data is added to the second worksheet.

Imported XLSX file first sheet

   and:

Imported XLSX file second sheet

Import data from XLSX file

EasyXLS allows you to import data from an Excel sheet or from the active Excel sheet. The entire sheet data or only data from ranges of cells can be imported.

C#.NET
VB.NET
C++
Java
PHP
ASP
VB6
VBS
Coldfusion
Python

Import data from XLSX file having one sheet

Importing data from an XLSX file, if the XLSX file has only one sheet, is the easiest approach. The Excel data can be imported with one single line of code using ExcelDocument.easy_ReadXLSXActiveSheet_AsDataSet method.
The above code sample shows how to achieve this goal.

Import data from XLSX file having multiple sheets

There are three approaches for importing data from an XLSX file with multiple sheets.

I. Usually the first sheet is the active sheet inside an XLSX file. If this is your case or if you are importing data from another active sheet use ExcelDocument.easy_ReadXLSXActiveSheet_AsDataSet method.

II. For importing data from an Excel sheet and the name of the sheet is known, EasyXLS recommends the use of ExcelDocument.easy_ReadXLSXSheet_AsDataSet method.

III. For importing data from an Excel sheet and the name of the sheet is not known, the first step is to find the sheet name by using ExcelDocument.easy_ReadXLSXFile_SheetNames method.
Then, import the sheet data using ExcelDocument.easy_ReadXLSXSheet_AsDataSet method.

Import data from range of Excel cells

EasyXLS enables you to import Excel data either from the entire sheet or from ranges of cells. Importing only a range of cells is a very useful option especially for large XLSX files because it reduces the speed of the import process.

In order to import multiple cell ranges at once from Excel sheet, the range parameter must be passed to the method as union of ranges (multiple ranges separated by comma).

All the methods that allow importing XLSX file to DataSet or ResultSet have parameters that permit importing only ranges of cells.

C#.NET
VB.NET
C++
Java
PHP
ASP
VB6
VBS
Coldfusion
Python

Import all XLSX file structures

EasyXLS allows you to import the whole XLSX file with sheets, data inside sheets, formulas, cell formatting, comments, hyperlinks, images, data validation, page setup, macros, groups, filters, charts, pivot tables and pivot charts.

The first above code sample shows how to achieve this goal.

Import XLSX file to SQL table in C# and VB.NET

EasyXLS library can be used to import Excel data to database like SQL Server, MySQL, Oracle, MS Access or any other database.

Import XLSX file to DataTable in C# and VB.NET

EasyXLS library can be used to import Excel sheets into DataTable. The DataTable can be the used as data source of a GridView, DataGridView, DataGrid or for any other purposes.

Import XLSX file to GridView in C# and VB.NET from ASP.NET

EasyXLS library can be used to import Excel data into GridView from ASP.NET web applications.

Import XLSX file to DataGridView in C# and VB.NET

EasyXLS library can be used to import Excel data into DataGridView from windows applications and windows forms.

Import XLSX file to DataSet in C# and VB.NET

EasyXLS library can be used to import Excel sheets into DataSet from windows applications, ASP.NET pages or console applications.

Import XLSX file to ResultSet in Java

EasyXLS library can be used to import Excel sheets into ResultSet from Java applications.

Import XLSX file to list

EasyXLS library can be used to import Excel sheets into lists of data.

Import XLSX file to DataGrid in C# and VB.NET

EasyXLS library can be used to import Excel data into DataGrid from windows applications and windows forms.

Import password protected XLSX file

EasyXLS allows importing encrypted Excel file. The Excel file can be password protected.

Getting started with EasyXLS Excel library

To download the trial version of EasyXLS Excel Library, press the below button:

Download EasyXLS™ Excel Library for .NET and Java

If you already own a license key, you may login and download EasyXLS from your account.



Available for: Professional, Excel Reader
Go to top

EasyXLS Excel libraries:

.NET
.NET Excel Library
full .NET version to import, export or convert Excel files
.NET Excel Reader
.NET version to read and import Excel files
COM+ Excel Library
full COM+ version to import, export or convert Excel files
COM+ Excel Reader
COM+ version to read and import Excel files
-
Java
Java Excel Library
full Java version to import, export or convert Excel files
Java Excel Reader
Java version to read and import Excel files
Download EasyXLS™ Excel Library for .NET and Java

File formats:

Office 365
MS Excel 2021 - 2024
MS Excel 2007 - 2019
MS Excel 97 - 2003
XLSXXLSMXLSBXLS
XMLHTMLCSVTXT