In today's world, working with data is an integral part of many professions. Microsoft Excel is one of the most popular tools for processing and analyzing it. Formulas in Excel allow you to automate calculations, simplify data analysis, and make reports more informative. However, when exporting data to Excel, it was not always possible to immediately use all the features of formulas.
Starting with version FastReport .NET 2026.1, it is now possible to export formulas to Excel. For example, to export the formula =A1*B1 to Excel, you need to create three text objects:
1. The first object is the value for cell A1.
2. The second object is the value for cell B1.
3. The third object is the formula that will be calculated in Excel (=A1*B1).
Report Designer view:
1. The formula must always start with an equal sign “=.”
2. By default, formula export is disabled.
3. Formula export is controlled by the ExportFormulas parameter. To use this function, enable the checkbox in the export settings (Other → Export formulas section).
If an incorrect formula is encountered in the report, the application will attempt to process it during export. In case of an error, a standard error message will appear in the file, and the cell with the formula will remain empty.
Formulas must use English Excel syntax. For example, instead of СУММ, you need to write SUM.
Available operators:
1. Unary +, - and binary +, -, *, /, ^, as well as comparisons <, <=, =, >=, >, <>.
2. Unary operator % (divides the number by 100). For example: =A1% is equivalent to =A1/100.
3. Operator : for specifying ranges. Example: =SUM(G1:G3) or =SUM(G1, G2, G3).
4. Operator ! : for references to other sheets. Example: =SUM(PageB!C1:C10).
5. Area intersection operator (space). For example, the expression A2:C2 B1:H8 will result in B2.
What it looks like in the prepared report:
What It looks like after export to Excel:
You can call standard Excel functions in formulas. One of these well-known functions is SUM—it sums its arguments. Among these functions are the widely used SUM, AVERAGE, INDIRECT, MIN, MAX, AND, OR, and so on.
What It looks like in the prepared report:
What It looks like after export to Excel:
A few technical details when working with formulas: In the final .xls file, the formula is stored as a regular cell. To ensure it works correctly, it is important to understand what data will be substituted into the cells that the formula references.
Thus, using Excel formulas when exporting reports from FastReport .NET allows you to automate calculations and make data analysis more efficient. It is important to properly configure the export of formulas, observe the syntax, and take into account the features of working with Excel operators and functions, which will ensure the correct display and calculation of data in the final tables.