EasyXLS

Tips for exporting large Excel file in .NET, Java and other programming languages

EasyXLS™ library allows you to export large data to Excel file with fast exporting time. The supported Excel file formats are XLSX, XLSM, XLSB, XLS and XML Spreadsheet, CSV, TXT, HTML as text files.

If not familiar with EasyXLS Excel library, read first how to export data to Excel file in .NET, how to export data to Excel file in Java and how to export data in PHP and Classic ASP.

The below 7 tips will guide you to export large Excel files.

1. Cell formatting

Use as much as possible ExcelStyle class when formatting cells. Setting the format properties for each cell increases the amount of used memory, affecting the performance when exporting large Excel files. It is recommended to create ExcelStyle objects to set the formatting style for cells.

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

2. Formatting style and themes

Do not create multiple instances of the same style or the same theme inside a loop. Define the instance of the style or theme outside the loop.

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

3. Data type of the cells

When setting the cell value, it is recommended to set the cell data type as well, otherwise the data type will remain by default as DataType.AUTOMATIC and EasyXLS will try to detect it. This action can be time consuming.

4. Recommended file formats

XLSB and XLS file formats are binary files and therefore are faster by default. EasyXLS recommends to use these file formats for better performances.

5. Formula calculation

Setting the formula calculation flag to false is recommended in case that calculating the formulas is not needed when writing the Excel files because, anyway, Microsoft Excel is recalculating them by default when opening the Excel files.
By applying this option, the formulas will no longer be computed and time-computing will be gained.

6. Java memory heap

When using Java programming language, it is recommended to add an extra parameter when running your application. JRE uses 64M of memory by default and your computer performances don't count. You need to increase the memory heap size by using -mx option (run your application using "java -mx512m").


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
COM+ Excel Library
full COM+ version to import, export or convert Excel files
COM+ Excel Writer
COM+ version to create and export Excel files
-
Java
Java Excel Library
full Java version to import, export or convert Excel files
Java Excel Writer
Java version to create and export 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