OpenXLSX 1.9.1
Loading...
Searching...
No Matches
XLTableColumn.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "XLXmlParser.hpp"
4#include <optional>
5#include <string>
6#include <string_view>
7
8namespace OpenXLSX
9{
10
15
21 {
22 public:
27 explicit XLTableColumn(XMLNode node);
28
33 operator bool() const;
34
39 uint32_t id() const;
40
45 std::string name() const;
46
51 void setName(std::string_view name);
52
58
64
69 std::string totalsRowLabel() const;
70
75 void setTotalsRowLabel(std::string_view label);
76
81 std::string calculatedColumnFormula() const;
82
87 void setCalculatedColumnFormula(std::string_view formula);
88
93 std::string totalsRowFormula() const;
94
99 void setTotalsRowFormula(std::string_view formula);
100
101 private:
102 XMLNode m_node;
103 };
104
105} // namespace OpenXLSX
Definition XLXmlParser.hpp:84
The XLTableColumn class encapsulates the <tableColumn> XML node. It allows setting different kinds of...
Definition XLTableColumn.hpp:21
void setCalculatedColumnFormula(std::string_view formula)
Set the calculated column formula.
Definition XLTableColumn.cpp:86
XLTotalsRowFunction totalsRowFunction() const
Get the totals row function for this column.
Definition XLTableColumn.cpp:17
void setTotalsRowFunction(XLTotalsRowFunction func)
Set the totals row function for this column.
Definition XLTableColumn.cpp:28
void setTotalsRowFormula(std::string_view formula)
Set a custom totals row formula.
Definition XLTableColumn.cpp:73
void setName(std::string_view name)
Set the name of the table column.
Definition XLTableColumn.cpp:15
uint32_t id() const
Get the ID of the table column.
Definition XLTableColumn.cpp:13
std::string totalsRowFormula() const
Get the custom totals row formula.
Definition XLTableColumn.cpp:67
std::string totalsRowLabel() const
Get the totals row label for this column.
Definition XLTableColumn.cpp:56
std::string calculatedColumnFormula() const
Get the calculated column formula.
Definition XLTableColumn.cpp:85
void setTotalsRowLabel(std::string_view label)
Set the totals row label for this column.
Definition XLTableColumn.cpp:57
std::string name() const
Get the name of the table column.
Definition XLTableColumn.cpp:14
Definition IZipArchive.hpp:18
XLTotalsRowFunction
Enum class defining the possible functions for a table's totals row.
Definition XLTableColumn.hpp:14