|
OpenXLSX 1.9.1
|
The XLTable class represents a single Excel table (.xml file). More...
#include <XLTables.hpp>
Public Member Functions | |
| XLTable () | |
| Constructor. | |
| XLTable (XLXmlData *xmlData) | |
| The constructor. | |
| XLTable (const XLTable &other)=default | |
| The copy constructor. | |
| XLTable (XLTable &&other) noexcept=default | |
| Move constructor. | |
| ~XLTable ()=default | |
| The destructor. | |
| XLTable & | operator= (const XLTable &)=default |
| Assignment operator. | |
| XLTable & | operator= (XLTable &&other) noexcept=default |
| Move assignment operator. | |
| uint32_t | id () const |
| Get the name of the table. | |
| std::string | name () const |
| Get the name of the table. | |
| void | setName (std::string_view name) |
| Set the name of the table. | |
| std::string | displayName () const |
| Get the display name of the table. | |
| void | setDisplayName (std::string_view name) |
| Set the display name of the table. | |
| std::string | rangeReference () const |
| Get the range reference of the table (e.g., "A1:C10") | |
| void | setRangeReference (std::string_view ref) |
| Set the range reference of the table. | |
| std::string | styleName () const |
| Get the table style name. | |
| void | setStyleName (std::string_view styleName) |
| Set the table style name. | |
| std::string | comment () const |
| Get the table comment. | |
| void | setComment (std::string_view comment) |
| Set the table comment. | |
| uint32_t | headerRowDxfId () const |
| Get the differential formatting ID for the header row. | |
| void | setHeaderRowDxfId (uint32_t id) |
| Set the differential formatting ID for the header row. | |
| uint32_t | dataDxfId () const |
| Get the differential formatting ID for the data rows. | |
| void | setDataDxfId (uint32_t id) |
| Set the differential formatting ID for the data rows. | |
| bool | published () const |
| Check if the table is published. | |
| void | setPublished (bool published) |
| Set whether the table is published. | |
| bool | showRowStripes () const |
| Check if row stripes are shown. | |
| void | setShowRowStripes (bool show) |
| Set whether row stripes are shown. | |
| bool | showHeaderRow () const |
| Check if the header row is shown. | |
| void | setShowHeaderRow (bool show) |
| Set whether the header row is shown. | |
| bool | showTotalsRow () const |
| Check if the totals row is shown. | |
| void | setShowTotalsRow (bool show) |
| Set whether the totals row is shown. | |
| bool | showColumnStripes () const |
| Check if column stripes are shown. | |
| void | setShowColumnStripes (bool show) |
| Set whether column stripes are shown. | |
| bool | showFirstColumn () const |
| Check if the first column is highlighted. | |
| void | setShowFirstColumn (bool show) |
| Set whether the first column is highlighted. | |
| bool | showLastColumn () const |
| Check if the last column is highlighted. | |
| void | setShowLastColumn (bool show) |
| Set whether the last column is highlighted. | |
| XLTableColumn | appendColumn (std::string_view name) |
| Append a new column to the table. | |
| XLTableColumn | column (std::string_view name) const |
| Get a column by its name. | |
| XLTableColumn | column (uint32_t id) const |
| Get a column by its 1-based ID. | |
| XLAutoFilter | autoFilter () const |
| Get the auto filter object for the table. | |
| void | resizeToFitData (const XLWorksheet &worksheet) |
| Automatically resizes the table to fit the contiguous data in the worksheet. | |
| void | createColumnsFromRange (const XLWorksheet &worksheet) |
| Automatically initializes the columns of the table from the header row of the specified worksheet range. | |
| void | print (std::basic_ostream< char > &ostr) const |
| Print the XML contents of this XLTable instance using the underlying XMLNode print function. | |
Public Member Functions inherited from OpenXLSX::XLXmlFile | |
| XLXmlFile ()=default | |
| Default constructor. | |
| std::string | xmlData (XLXmlSavingDeclaration savingDeclaration=XLXmlSavingDeclaration{}) const |
| Method for getting the XML data represented by the object. | |
| XLXmlFile (XLXmlData *xmlData) | |
| Constructor. Creates an object based on the xmlData input. | |
| XLXmlFile (const XLXmlFile &other)=default | |
| Copy constructor. Default implementation used. | |
| XLXmlFile (XLXmlFile &&other) noexcept=default | |
| Move constructor. Default implementation used. | |
| ~XLXmlFile ()=default | |
| Destructor. Default implementation used. | |
| bool | valid () const |
| check whether class is linked to a valid XML file | |
| XLXmlFile & | operator= (const XLXmlFile &other)=default |
| The copy assignment operator. The default implementation has been used. | |
| XLXmlFile & | operator= (XLXmlFile &&other) noexcept=default |
| The move assignment operator. The default implementation has been used. | |
| XLDocument & | parentDoc () |
| This function provides access to the parent XLDocument object. | |
| const XLDocument & | parentDoc () const |
| This function provides access to the parent XLDocument object. | |
| XMLDocument & | xmlDocument () |
| This function provides access to the underlying XMLDocument object. | |
| const XMLDocument & | xmlDocument () const |
| This function provides access to the underlying XMLDocument object. | |
| std::string | getXmlPath () const |
| Retrieve the path of the XML data in the .xlsx zip archive via m_xmlData->getXmlPath. | |
Friends | |
| class | XLTableCollection |
| class | XLWorksheet |
Additional Inherited Members | |
Protected Member Functions inherited from OpenXLSX::XLXmlFile | |
| void | setXmlData (std::string_view xmlData) |
| Provide the XML data represented by the object. | |
| std::string | relationshipID () const |
| This function returns the relationship ID (the ID used in the XLRelationships objects) for the object. | |
Protected Attributes inherited from OpenXLSX::XLXmlFile | |
| XLXmlData * | m_xmlData {nullptr} |
The XLTable class represents a single Excel table (.xml file).
|
inline |
Constructor.
| OpenXLSX::XLTable::XLTable | ( | XLXmlData * | xmlData | ) |
The constructor.
| xmlData | the source XML of the table file |
|
default |
The copy constructor.
| other | The object to be copied. |
|
defaultnoexcept |
Move constructor.
|
default |
The destructor.
| XLTableColumn OpenXLSX::XLTable::appendColumn | ( | std::string_view | name | ) |
| XLAutoFilter OpenXLSX::XLTable::autoFilter | ( | ) | const |
Get the auto filter object for the table.
| XLTableColumn OpenXLSX::XLTable::column | ( | std::string_view | name | ) | const |
| XLTableColumn OpenXLSX::XLTable::column | ( | uint32_t | id | ) | const |
Get a column by its 1-based ID.
| id | The 1-based ID of the column |
| std::string OpenXLSX::XLTable::comment | ( | ) | const |
Get the table comment.
| void OpenXLSX::XLTable::createColumnsFromRange | ( | const XLWorksheet & | worksheet | ) |
Automatically initializes the columns of the table from the header row of the specified worksheet range.
| worksheet | The parent worksheet. |
| uint32_t OpenXLSX::XLTable::dataDxfId | ( | ) | const |
Get the differential formatting ID for the data rows.
| std::string OpenXLSX::XLTable::displayName | ( | ) | const |
Get the display name of the table.
| uint32_t OpenXLSX::XLTable::headerRowDxfId | ( | ) | const |
Get the differential formatting ID for the header row.
| uint32_t OpenXLSX::XLTable::id | ( | ) | const |
Get the name of the table.
| std::string OpenXLSX::XLTable::name | ( | ) | const |
Get the name of the table.
Move assignment operator.
| void OpenXLSX::XLTable::print | ( | std::basic_ostream< char > & | ostr | ) | const |
Print the XML contents of this XLTable instance using the underlying XMLNode print function.
| bool OpenXLSX::XLTable::published | ( | ) | const |
Check if the table is published.
| std::string OpenXLSX::XLTable::rangeReference | ( | ) | const |
Get the range reference of the table (e.g., "A1:C10")
| void OpenXLSX::XLTable::resizeToFitData | ( | const XLWorksheet & | worksheet | ) |
Automatically resizes the table to fit the contiguous data in the worksheet.
| worksheet | The worksheet containing this table. |
| void OpenXLSX::XLTable::setComment | ( | std::string_view | comment | ) |
Set the table comment.
| comment | The new comment string. |
| void OpenXLSX::XLTable::setDataDxfId | ( | uint32_t | id | ) |
Set the differential formatting ID for the data rows.
| id | The DxfId. |
| void OpenXLSX::XLTable::setDisplayName | ( | std::string_view | name | ) |
Set the display name of the table.
| name | The new display name |
| void OpenXLSX::XLTable::setHeaderRowDxfId | ( | uint32_t | id | ) |
Set the differential formatting ID for the header row.
| id | The DxfId. |
| void OpenXLSX::XLTable::setName | ( | std::string_view | name | ) |
Set the name of the table.
| name | The new table name (must not contain spaces) |
| void OpenXLSX::XLTable::setPublished | ( | bool | published | ) |
Set whether the table is published.
| published | True if published. |
| void OpenXLSX::XLTable::setRangeReference | ( | std::string_view | ref | ) |
Set the range reference of the table.
| ref | The new range reference (e.g., "A1:C10") |
| void OpenXLSX::XLTable::setShowColumnStripes | ( | bool | show | ) |
Set whether column stripes are shown.
| show | True to show column stripes |
| void OpenXLSX::XLTable::setShowFirstColumn | ( | bool | show | ) |
Set whether the first column is highlighted.
| show | True to highlight the first column |
| void OpenXLSX::XLTable::setShowHeaderRow | ( | bool | show | ) |
Set whether the header row is shown.
| show | True to show the header row |
| void OpenXLSX::XLTable::setShowLastColumn | ( | bool | show | ) |
Set whether the last column is highlighted.
| show | True to highlight the last column |
| void OpenXLSX::XLTable::setShowRowStripes | ( | bool | show | ) |
Set whether row stripes are shown.
| show | True to show row stripes |
| void OpenXLSX::XLTable::setShowTotalsRow | ( | bool | show | ) |
Set whether the totals row is shown.
| show | True to show the totals row |
| void OpenXLSX::XLTable::setStyleName | ( | std::string_view | styleName | ) |
Set the table style name.
| styleName | The new style name (e.g., "TableStyleMedium2") |
| bool OpenXLSX::XLTable::showColumnStripes | ( | ) | const |
Check if column stripes are shown.
| bool OpenXLSX::XLTable::showFirstColumn | ( | ) | const |
Check if the first column is highlighted.
| bool OpenXLSX::XLTable::showHeaderRow | ( | ) | const |
Check if the header row is shown.
| bool OpenXLSX::XLTable::showLastColumn | ( | ) | const |
Check if the last column is highlighted.
| bool OpenXLSX::XLTable::showRowStripes | ( | ) | const |
Check if row stripes are shown.
| bool OpenXLSX::XLTable::showTotalsRow | ( | ) | const |
Check if the totals row is shown.
| std::string OpenXLSX::XLTable::styleName | ( | ) | const |
Get the table style name.
|
friend |
|
friend |