EasyXLS

How to export to Excel file in PHP and ASP classic

Concept:

EasyXLS™ library allows you to export data to an Excel file having one or multiple sheets. The data in cells can be formatted using predefined formats or user-defined formats.

EasyXLS can be successfully used inclusively to export large Excel files having big volume of data with fast exporting time.

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

Concept in action:

The below example is a common code about how to export to Excel file in PHP and ASP classic. After that, the best techniques about exporting data from any database like MySQL, SQL Server, Oracle or MS Access are shown. Also, more code samples indicate how to export data to XLSX, XLSM, XLS or XLSB file format.

Source code sample

PHP
ASP

1. Export data from database to Excel in PHP and ASP classic

EasyXLS allows exporting data from MySQL, Oracle, MS SQL Server, MS Access or any other database to Excel file.

2. Export data to XLSX file in PHP and ASP classic

EasyXLS allows exporting data to XLSX file format. In a similar way, as illustrated in the above code sample, you can export data to XLSX file using ExcelDocument.easy_WriteXLSXFile method.

3. Export data to XLSB file in PHP and ASP classic

EasyXLS allows exporting data to XLSB file format. In a similar way, as illustrated in the above code sample, you can export data to XLSB file using ExcelDocument.easy_WriteXLSBFile method.

4. Export data to XLSM file in PHP and ASP classic

EasyXLS allows exporting data to XLSM file format. The first step is to create an XLSM or XLTM file in Microsoft Excel that has the macro code defined. The Excel file can be empty or already filled with sheets and some data like report header. This will be the Excel template file that will be loaded using ExcelDocument.easy_LoadXLSXFile method. Now, the data can be added to the Excel file in a similar way, as illustrated in the above code sample. When the Excel file is completely filled, you can export data to XLSM file using ExcelDocument.easy_WriteXLSXFile method, but the exported Excel file must have XLSM file extension.

5. Export data to XLS file in PHP and ASP classic

EasyXLS allows exporting data to XLS file format. In a similar way, as illustrated in the above code sample, you can export data to XLS file using ExcelDocument.easy_WriteXLSFile method.

Formatting cells

EasyXLS™ enables you to format cells, rows and columns in order to set the fonts and colors.

Getting started with EasyXLS Excel library

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

Download EasyXLS™ Excel Library for PHP and ASP classic

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



Available for: Professional, Excel Writer
Go to top

EasyXLS Excel libraries:

.NET
.NET Excel Library
full .NET version to import, export or convert Excel files
.NET Excel Writer
.NET version to create and export Excel files
.NET Express Excel Writer
limited .NET version to create and export Excel files in predefined formats
Download EasyXLS™ Excel Component for PHP and ASP classic

File formats:

MS Excel 97
MS Excel 2003
MS Excel 2007
MS Excel 2010
MS Excel 2013
MS Excel 2016
MS Excel 2019
XLS XLSX XLSM XLSB
XML HTML CSV TXT