OpenXLSX 1.12.1
Modern C++ Excel Library (Fork of OpenXLSX by Kenneth Troldal Balslev)
Loading...
Searching...
No Matches
OpenXLSX::XLChartsheet Class Referencefinal

Class representing an Excel chartsheet. More...

#include <XLChartsheet.hpp>

Inheritance diagram for OpenXLSX::XLChartsheet:
OpenXLSX::XLSheetBase< XLChartsheet > OpenXLSX::XLXmlFile

Public Member Functions

 XLChartsheet ()
 XLChartsheet (XLXmlData *xmlData)
 XLChartsheet (const XLChartsheet &other)=default
 XLChartsheet (XLChartsheet &&other) noexcept=default
 ~XLChartsheet ()
XLChartsheet & operator= (const XLChartsheet &other)=default
XLChartsheet & operator= (XLChartsheet &&other) noexcept=default
XLChart addChart (XLChartType type, std::string_view name)
 Add or replace the chart in this chartsheet.
XLDrawing & drawing ()
 Get the underlying drawing for this chartsheet.
XLRelationships & relationships ()
Public Member Functions inherited from OpenXLSX::XLSheetBase< XLChartsheet >
 XLSheetBase ()
 Constructor.
 ~XLSheetBase ()=default
 The destructor.
XLSheetBase & operator= (const XLSheetBase &)=default
 Assignment operator.
XLSheetState visibility () const
void setVisibility (XLSheetState state)
XLColor color () const
void setColor (const XLColor &color)
uint16_t index () const
 look up sheet name via relationshipID, then attempt to match that to a sheet in XLWorkbook::sheet(uint16_t index), looping over index
void setIndex (uint16_t index)
std::string name () const
 Method to retrieve the name of the sheet.
void setName (const std::string &sheetName)
 Method for renaming the sheet.
bool isSelected () const
void setSelected (bool selected)
bool isActive () const
bool setActive ()
void clone (const std::string &newName)
 Method for cloning the sheet.
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.
XLPackageServices & package ()
 Narrow package-services port (archive, managed XML parts, relationships, content types).
const XLPackageServices & package () const
XLPackagePartFactory & partFactory ()
 Narrow package-part factory port (chart / drawing / image / slicer / sheet accessories).
const XLPackagePartFactory & partFactory () const
const XLSharedStringTable & sharedStringTable () const
 Read-only shared string table (SST) port.
const XLSharedStrings & sharedStrings () const
 Full workbook SST (including getOrCreate / append).
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.
const XLXmlData * xmlDataPart () const noexcept
 Access the underlying XLXmlData pointer.
XLXmlData * xmlDataPart () noexcept

Friends

class XLSheetBase< XLChartsheet >

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}

Detailed Description

Class representing an Excel chartsheet.

Constructor & Destructor Documentation

◆ XLChartsheet() [1/4]

OpenXLSX::XLChartsheet::XLChartsheet ( )
inline

◆ XLChartsheet() [2/4]

XLChartsheet::XLChartsheet ( XLXmlData * xmlData)
explicit

◆ XLChartsheet() [3/4]

OpenXLSX::XLChartsheet::XLChartsheet ( const XLChartsheet & other)
default

◆ XLChartsheet() [4/4]

OpenXLSX::XLChartsheet::XLChartsheet ( XLChartsheet && other)
defaultnoexcept

◆ ~XLChartsheet()

XLChartsheet::~XLChartsheet ( )
default

Member Function Documentation

◆ addChart()

XLChart XLChartsheet::addChart ( XLChartType type,
std::string_view name )

Add or replace the chart in this chartsheet.

Parameters
typeThe type of chart to create
nameThe name of the chart object
Returns
The created XLChart object

◆ drawing()

XLDrawing & XLChartsheet::drawing ( )

Get the underlying drawing for this chartsheet.

◆ operator=() [1/2]

XLChartsheet & OpenXLSX::XLChartsheet::operator= ( const XLChartsheet & other)
default

◆ operator=() [2/2]

XLChartsheet & OpenXLSX::XLChartsheet::operator= ( XLChartsheet && other)
defaultnoexcept

◆ relationships()

XLRelationships & XLChartsheet::relationships ( )

◆ XLSheetBase< XLChartsheet >

friend class XLSheetBase< XLChartsheet >
friend

The documentation for this class was generated from the following files: