User GuideFAQHow to import Excel file in PHP and Classic ASP
How to import Excel file in PHP and Classic ASP
EasyXLS™ library allows you to import data from an Excel file or other sheet elements like cell formatting, charts, pivot tables, comments, images and others.
EasyXLS can be successfully used to also import large Excel files having big volume of data with fast importing time.
EasyXLS permits you to import Excel files without Excel installed, without OLEDB, without Interop or any other additional software installed.
Step 3: Run PHP/ASP code that imports data from Excel file
The below example shows how to import data from Excel file in PHP and Classic ASP. After that, the best techniques about importing the entire Excel file structures or importing Excel data to MySQL, SQL Server, Oracle or any other database are shown.
1. Import data from Excel 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.
EasyXLS enables you to import Excel data either from the entire sheet or from a range of cells. Importing only a range of cells is a very useful option especially for large Excel 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 Excel to List have parameters that permit importing only ranges of cells.
5. Import all Excel file structures
EasyXLS allows you to import the whole Excel 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.
.NET:// Create an instance of the class that imports Excel files
$workbook = new COM("EasyXLS.ExcelDocument");
// Import Excel file
$workbook->easy_LoadXLSXFile("C:\\Samples\\Excel file.xlsx");
Java:// Create an instance of the class that imports Excel files
$workbook = new java("EasyXLS.ExcelDocument");
// Import Excel file
$workbook->easy_LoadXLSXFile("C:\\Samples\\Excel file.xlsx");
' Create an instance of the class that imports Excel filesset workbook = Server.CreateObject("EasyXLS.ExcelDocument")
' Import Excel file
workbook.easy_LoadXLSXFile("C:\Samples\Excel file.xlsx")
6. Import Excel file to MySQL, SQL Server in PHP and Classic ASP
EasyXLS library can be used to import Excel data to database like MySQL, SQL Server, Oracle, MS Access or any other database.