EasyXLS

Calculate formulas

EasyXLS™ library allows you to calculate Excel formulas by defining formulas with functions or loading template Excel files with predefined formulas. The defined spreadsheet can be optionally exported to Excel.

The library can be used as Excel calculation engine. The engine provides all the functions supported by Excel as far as formulas are concerned. It provides arithmetic, logical and unary operators, formulas with numbers, dates and strings, formulas with cell references, formulas with cell ranges, formulas with names and with arrays.

Formula calculation is enabled by default. If the calculation was disabled, it must be enabled, otherwise the formulas are not calculated.

EasyXLS library can be integrated in:
- ASP.NET web pages
- Windows applications
- Windows Forms (WinForms)
- Console applications
- Windows service applications
- ASP.NET MVC web applications
- PHP and ASP web pages
- Java applications

Calculate spreadsheet formulas

The below example shows how to calculate Excel formulas and read the formula result.
C#.NET
VB.NET
C++
Java
PHP
ASP
VB6
VBS
Coldfusion
Python

Excel functions

The calculation engine provides all the functions supported by Excel. The full list of formulas elements can be found at the following link.

Export to Excel with formulas calculation

EasyXLS allows you to export formulas to Excel file. The above code sample shows how to achieve this goal.

The formula is a cell value that must start with the "=" sign (i.e. =A1+C2).

Import Excel file and calculate formulas

EasyXLS allows you to import an Excel file as a template with predefined formulas with functions, calculate spreadsheet formulas and read the formula result.

The below source code sample shows how to load an Excel file with formula "=SUM(A1:A4)" set on A6 cell, populate A1-A4 cells with data, calculate Excel formulas and read the formula result.

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

Calculate cell value

If only one formula result from one cell is required, for optimization purposes, only a specific cell can be calculated along with all other referenced cells that implies the formula value.

The below source code sample shows how to calculate one single cell from the worksheet.
C#.NET
VB.NET
C++
Java
PHP
ASP
VB6
VBS
Coldfusion
Python

Circular references

EasyXLS allows you to detect the circular references that might occur when formulas are calculated. A list with all issues of this type can be accessed using ExcelDocument.getCircularReferences method. The circular references are also displayed at the console, if the console messages are enabled.

The iterative calculation can be enabled and the maximum number of iterations or maximum change can be adjusted using ExcelOptions.setIterativeCalculation method. The iterative calculation is disabled by default.

The below source code sample shows how to enable the iterative calculation, set the maximum number of iteration and maximum change.

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

Enable formula calculation

EasyXLS offers the option to disable formula calculation for optimization purposes. If for any reason, formula calculation was previously disabled, it must be enabled using ExcelOptions.setCalculateFormulas method.

The below source code sample shows how to enable the formula calculation.

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

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 Writer, Excel Reader
Go to top

EasyXLS Excel libraries:

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