-
Notifications
You must be signed in to change notification settings - Fork 277
Legacy arrayformulas
Mats Alm edited this page Oct 26, 2023
·
6 revisions
EPPlus has support for legacy array formulas and support for several new functions that depends on this functionality from version 7 and up. We have also improved the support for handling of complex addresses and usage of operators with ranges/addresses.
Legacy arrayformulas are added with the function CreateArrayFormula on the ExcelRangeBase class - this corresponds to selecting a range in Excel, enter the formula in the top-left cell and then pressing CTRL+SHIFT+ENTER to confirm it.
With legacy array formulas you must specify the target range of the array, see example below:
sheet.Cells["A1"].Value = 1;
sheet.Cells["A2"].Value = 2;
sheet.Cells["A3"].Value = 3;
sheet.Cells["A4:C4"].CreateArrayFormula("TRANSPOSE(A1:A3)");
sheet.Calculate();
// A4:C4 will now contain 1, 2, 3
EPPlus Software AB - https://epplussoftware.com
- What is new in EPPlus 5+
- Breaking Changes in EPPlus 5
- Breaking Changes in EPPlus 6
- Breaking Changes in EPPlus 7
- Addressing a worksheet
- Dimension/Used range
- Copying ranges/sheets
- Insert/Delete
- Filling ranges
- Sorting ranges
- Taking and skipping columns/rows
- Data validation
- Comments
- Freeze and Split Panes
- Header and Footer
- Autofit columns
- Grouping and Ungrouping Rows and Columns
- Formatting and styling
- Conditional formatting
- Using Themes
- Working with custom named table- or slicer- styles