OpenXLSX 1.9.1
Loading...
Searching...
No Matches
XLColumn.hpp
Go to the documentation of this file.
1#ifndef OPENXLSX_XLCOLUMN_HPP
2#define OPENXLSX_XLCOLUMN_HPP
3
4#ifdef _MSC_VER // conditionally enable MSVC specific pragmas to avoid other compilers warning about unknown pragmas
5# pragma warning(push)
6# pragma warning(disable : 4251)
7# pragma warning(disable : 4275)
8#endif // _MSC_VER
9
10// ===== External Includes ===== //
11#include <memory>
12
13// ===== OpenXLSX Includes ===== //
14#include "OpenXLSX-Exports.hpp"
15#include "XLStyle.hpp"
16#include "XLStyles.hpp" // XLStyleIndex
17#include "XLStyles.hpp"
18#include "XLXmlParser.hpp"
19
20namespace OpenXLSX
21{
25 class OPENXLSX_EXPORT XLColumn
26 {
27 public:
32 explicit XLColumn(XMLNode columnNode);
33
38 float width() const;
39
44 void setWidth(float width);
45
50 void autoFit();
51
56 bool isHidden() const;
57
62 void setHidden(bool state);
63
68 uint8_t outlineLevel() const;
69
74 void setOutlineLevel(uint8_t level);
75
80 bool isCollapsed() const;
81
86 void setCollapsed(bool state);
87
92 XMLNode columnNode() const;
93
99 XLStyleIndex format() const;
100
106 bool setFormat(XLStyleIndex cellFormatIndex);
107
108 private:
114 XMLAttribute getOrCreateAttribute(const char* attrName);
115
116 XMLNode m_columnNode;
117 };
118
119} // namespace OpenXLSX
120
121#ifdef _MSC_VER // conditionally enable MSVC specific pragmas to avoid other compilers warning about unknown pragmas
122# pragma warning(pop)
123#endif // _MSC_VER
124
125#endif // OPENXLSX_XLCOLUMN_HPP
Definition XLXmlParser.hpp:84
Definition XLColumn.hpp:26
Definition IZipArchive.hpp:18
pugi::xml_attribute XMLAttribute
Definition XLXmlParser.hpp:64
size_t XLStyleIndex
Definition XLStyles.hpp:31