|
OpenXLSX 1.9.1
|
#include <XLColumn.hpp>
Public Member Functions | |
| XLColumn (XMLNode columnNode) | |
| Constructor. | |
| float | width () const |
| Get the width of the column. | |
| void | setWidth (float width) |
| Set the width of the column. | |
| void | autoFit () |
| Auto fit the column width based on the content of its cells. | |
| bool | isHidden () const |
| Is the column hidden? | |
| void | setHidden (bool state) |
| Set the column to be shown or hidden. | |
| uint8_t | outlineLevel () const |
| Get the outline level of the column. | |
| void | setOutlineLevel (uint8_t level) |
| Set the outline level of the column. | |
| bool | isCollapsed () const |
| Is the column collapsed? | |
| void | setCollapsed (bool state) |
| Set the column to be collapsed or expanded. | |
| XMLNode | columnNode () const |
| Get the XMLNode object for the column. | |
| XLStyleIndex | format () const |
| Get the array index of xl/styles.xml:<styleSheet>:<cellXfs> for the style assigned to the column. This value is stored in the col attributes like so: style="2". | |
| bool | setFormat (XLStyleIndex cellFormatIndex) |
| Set the column style as a reference to the array index of xl/styles.xml:<styleSheet>:<cellXfs> | |
|
explicit |
Constructor.
| columnNode | The XMLNode for the column. |
Assumes each node only has data for one column.
| void XLColumn::autoFit | ( | ) |
Auto fit the column width based on the content of its cells.
| XMLNode XLColumn::columnNode | ( | ) | const |
Get the XMLNode object for the column.
| XLStyleIndex XLColumn::format | ( | ) | const |
Get the array index of xl/styles.xml:<styleSheet>:<cellXfs> for the style assigned to the column. This value is stored in the col attributes like so: style="2".
Determine the value of the style attribute - if attribute does not exist, return default value
| bool XLColumn::isCollapsed | ( | ) | const |
Is the column collapsed?
Is the column collapsed?
| bool XLColumn::isHidden | ( | ) | const |
Is the column hidden?
| uint8_t XLColumn::outlineLevel | ( | ) | const |
Get the outline level of the column.
Get the outline level of the column.
| void XLColumn::setCollapsed | ( | bool | state | ) |
Set the column to be collapsed or expanded.
| state | The collapsed state of the column. |
Set the column to be collapsed or expanded.
| bool XLColumn::setFormat | ( | XLStyleIndex | cellFormatIndex | ) |
Set the column style as a reference to the array index of xl/styles.xml:<styleSheet>:<cellXfs>
Set the column style as a reference to the array index of xl/styles.xml:<styleSheet>:<cellXfs> If the style attribute does not exist, create it.
| cellFormatIndex | The style to set, corresponding to the index of XLStyles::cellStyles() |
| void XLColumn::setHidden | ( | bool | state | ) |
Set the column to be shown or hidden.
| state | The state of the column. |
| void XLColumn::setOutlineLevel | ( | uint8_t | level | ) |
Set the outline level of the column.
| level | The outline level (0-7). |
Set the outline level of the column.
| void XLColumn::setWidth | ( | float | width | ) |
Set the width of the column.
| width | The width of the column |
| float XLColumn::width | ( | ) | const |
Get the width of the column.