-
Notifications
You must be signed in to change notification settings - Fork 293
Referencing tables in formulas
Jan Källman edited this page Dec 12, 2022
·
10 revisions
EPPlus / OOXML has a somewhat different way of referencing cells inside tables, than used in the Excel GUI.
Addresses within tables can be referenced either relative or absolute in a formula.
A table address always starts with the table name, followed by a section of the table and/or a column wrapped in brackets. For example:
Syntax | Description |
---|---|
Table1[#all] |
Reference the whole table including headers and totals |
Table1[] |
Reference the data part of the table excluding the headers and totals. This is the same as Table1[#Data] |
Table1[Column1] |
Reference the data part of the column "Column1" within the table Table1 |
Table1[[#This Row],[Column2]] |
Reference the row at the same row as the formula cell of column "Column2" within the table Table1. In Excel this would look like Table1[@Column2]
|
Table1[[#Data],[#Totals],[Column2]]]] |
Reference the data and totals part of the column "Column2" within the table Table1 |
Table1[[#Headers],[Column1]] |
Reference the header cell of the column "Column1" within the table Table1 |
Table1[[Column12]:[Column2]] |
Reference the data part of column "Column1" to "Column2" within the table Table1 |
Table1[[#Data],[#Totals],[Column12]:[Column2]] |
Reference the data and totals part of column "Column1" to "Column2" within the table Table1 |
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
- Breaking Changes in EPPlus 8
- 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
- Hyperlinks
- Autofit columns
- Grouping and Ungrouping Rows and Columns
- Formatting and styling
- Conditional formatting
- Using Themes
- Working with custom named table- or slicer- styles