The XLTableColumn class encapsulates the <tableColumn> XML node. It allows setting different kinds of column properties in a table.
More...
#include <XLTableColumn.hpp>
The XLTableColumn class encapsulates the <tableColumn> XML node. It allows setting different kinds of column properties in a table.
◆ XLTableColumn()
| OpenXLSX::XLTableColumn::XLTableColumn |
( |
XMLNode |
node | ) |
|
|
explicit |
Constructor.
- Parameters
-
| node | The <tableColumn> XMLNode |
◆ calculatedColumnFormula()
| std::string OpenXLSX::XLTableColumn::calculatedColumnFormula |
( |
| ) |
const |
Get the calculated column formula.
- Returns
- The formula string, or an empty string if not set.
◆ id()
| uint32_t OpenXLSX::XLTableColumn::id |
( |
| ) |
const |
Get the ID of the table column.
- Returns
- The column ID.
◆ name()
| std::string OpenXLSX::XLTableColumn::name |
( |
| ) |
const |
Get the name of the table column.
- Returns
- The column name.
◆ operator bool()
| OpenXLSX::XLTableColumn::operator bool |
( |
| ) |
const |
Check if the TableColumn object is valid (has a corresponding XML node).
- Returns
- true if valid, false otherwise.
◆ setCalculatedColumnFormula()
| void OpenXLSX::XLTableColumn::setCalculatedColumnFormula |
( |
std::string_view |
formula | ) |
|
Set the calculated column formula.
- Parameters
-
| formula | The formula string (e.g., "[@Price]*[@Quantity]"). |
◆ setName()
| void OpenXLSX::XLTableColumn::setName |
( |
std::string_view |
name | ) |
|
Set the name of the table column.
- Parameters
-
| name | The new name of the column. |
◆ setTotalsRowFormula()
| void OpenXLSX::XLTableColumn::setTotalsRowFormula |
( |
std::string_view |
formula | ) |
|
Set a custom totals row formula.
- Parameters
-
| formula | The formula string. |
◆ setTotalsRowFunction()
Set the totals row function for this column.
- Parameters
-
| func | The XLTotalsRowFunction to set. |
◆ setTotalsRowLabel()
| void OpenXLSX::XLTableColumn::setTotalsRowLabel |
( |
std::string_view |
label | ) |
|
Set the totals row label for this column.
- Parameters
-
| label | The string to set as label. |
◆ totalsRowFormula()
| std::string OpenXLSX::XLTableColumn::totalsRowFormula |
( |
| ) |
const |
Get the custom totals row formula.
- Returns
- The formula string, or an empty string if not set.
◆ totalsRowFunction()
Get the totals row function for this column.
- Returns
- The XLTotalsRowFunction.
◆ totalsRowLabel()
| std::string OpenXLSX::XLTableColumn::totalsRowLabel |
( |
| ) |
const |
Get the totals row label for this column.
- Returns
- The custom string label.
The documentation for this class was generated from the following files: