EasyXLS

How to export to Excel file in PHP and Classic ASP

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.

Source code sample

Step 1: Download and install EasyXLS Excel Library for .NET/COM+

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

Download EasyXLS™ Excel Library for COM+

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

Step 2: Verify if EasyXLS is registered

Check if EasyXLS component is present in Component Services.

Step 3: Run PHP/ASP code that exports to Excel file

The below example is a common code about how to export to Excel file in PHP and Classic ASP. 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.

PHP
ASP

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

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 Classic ASP

EasyXLS allows exporting data to XLSX file format. Similarly, as shown 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 Classic ASP

EasyXLS allows exporting data to XLSB file format. Similarly, as shown 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 Classic ASP

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 similarly, as shown 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 Classic ASP

EasyXLS allows exporting data to XLS file format. Similarly, as shown in the above code sample, you can export data to XLS file using ExcelDocument.easy_WriteXLSFile method.

6. Formatting cells

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

7. Export password protected Excel file in PHP and Classic ASP

EasyXLS allows exporting 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 PHP and Classic ASP

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
COM+ Excel Library
full COM+ version to import, export or convert Excel files
COM+ Excel Writer
COM+ version to create and export Excel files
COM+ Express Excel Writer
limited COM+ version to create and export Excel files in predefined formats
Download EasyXLS™ Excel Component for PHP and Classic ASP

File formats:

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