The Syncfusion® .NET Excel library (XlsIO) provides comprehensive support for handling and manipulating Excel formulas. Users can seamlessly create, manage, and calculate formulas within worksheets, extending the functionality and capabilities of their Excel workbooks. This library supports 400+ built-in Excel functions for creating Excel documents.
This example code shows how to add a formula to an Excel worksheet using the Syncfusion® .NET Excel Library with just a few lines of C# code.
// Initialize Excel engine and application
using ExcelEngine excelEngine = new ExcelEngine();
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
// Create a workbook and worksheet
IWorkbook workbook = application.Workbooks.Create(1);
IWorksheet sheet = workbook.Worksheets[0];
// Setting values to the cells
sheet.Range["A1"].Number = 10;
sheet.Range["B1"].Number = 10;
// Setting formula in the cell
sheet.Range["C1"].Formula = "=SUM(A1,B1)";
// Save the Excel document
using FileStream stream = new FileStream("Formula.xlsx", FileMode.Create, FileAccess.ReadWrite);
workbook.SaveAs(stream);
Discover how the formula capabilities in the Excel Library simplify complex calculations and efficiently handle formulas within Excel worksheets.
Apply a single formula to a range of cells to perform calculations on multiple values at once. This enhances efficiency and reduces manual input, while ensuring accurate, consistent results across large datasets.
Apply a formula across a range of cells, where each cell calculates based on its relative position or sequence, incrementing by 1.
Formulas that reference data from other worksheets or workbooks, enabling calculations that integrate information across multiple sources.
Formulas that use predefined name ranges to refer to specific cells or ranges, enhancing readability and simplifying formula management by allowing easy updates and consistent references across the workbook.
A column within an Excel table where each cell contains a formula that automatically updates based on the table’s data. This feature ensures dynamic and consistent calculations as rows are added or modified, simplifying data management and analysis.
Determine how and when Excel recalculates formulas, including automatic or manual recalculation modes, options to recalculate before saving, and settings for iterative calculations to meet specific numeric conditions.
Discover valuable resources from our blog and knowledge base articles to enhance your efficiency in using Excel formulas.
Explore these resources for comprehensive guides, knowledge base articles, insightful blogs, and ebooks.
Product Updates
Technical Support
The Syncfusion® Excel library supports various formulas, including mathematical functions, logical operators, text manipulation functions, date and time functions, and statistical functions. Users can use over 400 built-in Excel functions to create dynamic Excel documents for their specific needs.
Yes. Users can enable or disable the calculation mode for XlsIO.
No. The named range name should be unique in a worksheet when the named range scope is worksheet level. You can create a named range with the same name but with a workbook level scope.
Yes. The Syncfusion® Excel library provides comprehensive support for manipulating and calculating Excel formulas programmatically using C# code. Users can seamlessly create, modify, and evaluate Excel formulas within worksheets, extending the functionality and capabilities of their Excel workbooks while maintaining data integrity and accuracy.
Yes. The Syncfusion® Excel library uses the argument and list separators for formulas based on the application’s system culture. However, it allows you to modify the separators easily.
Yes. The Syncfusion® Excel library allows the addition of formulas with add-in functions and creation of Excel documents.
Greatness—it’s one thing to say you have it, but it means more when others recognize it. Syncfusion® is proud to hold the following industry awards.