OpenXLSX 1.12.1
Modern C++ Excel Library (Fork of OpenXLSX by Kenneth Troldal Balslev)
Loading...
Searching...
No Matches
OpenXLSX::XLCellKey Struct Reference

Normalized cell identity used by the calculation graph. More...

#include <XLCalculationEngine.hpp>

Public Member Functions

bool valid () const noexcept
bool operator== (const XLCellKey &other) const noexcept
std::string address () const
std::string qualifiedAddress () const

Static Public Member Functions

static XLCellKey parse (std::string_view ref, std::string_view defaultSheet={}, bool forceDefaultSheet=false)
 Parse "A1", "$B$2", "Sheet1!C3", or "'My Sheet'!A1".

Data Fields

std::string sheet
uint32_t row {0}
uint16_t col {0}

Detailed Description

Normalized cell identity used by the calculation graph.

In single-sheet mode, sheet is empty for the engine default sheet. In multi-sheet (workbook) mode, sheet is always set to the home sheet name. Coordinates are 1-based Excel indices.

Member Function Documentation

◆ address()

std::string OpenXLSX::XLCellKey::address ( ) const
nodiscard

◆ operator==()

bool OpenXLSX::XLCellKey::operator== ( const XLCellKey & other) const
inlinenodiscardnoexcept

◆ parse()

XLCellKey OpenXLSX::XLCellKey::parse ( std::string_view ref,
std::string_view defaultSheet = {},
bool forceDefaultSheet = false )
staticnodiscard

Parse "A1", "$B$2", "Sheet1!C3", or "'My Sheet'!A1".

Parameters
defaultSheetOptional default sheet name for unqualified refs (left empty on the key unless forceDefaultSheet is true).
forceDefaultSheetWhen true, unqualified refs get sheet=defaultSheet (workbook mode).

◆ qualifiedAddress()

std::string OpenXLSX::XLCellKey::qualifiedAddress ( ) const
nodiscard

◆ valid()

bool OpenXLSX::XLCellKey::valid ( ) const
inlinenodiscardnoexcept

Field Documentation

◆ col

uint16_t OpenXLSX::XLCellKey::col {0}

◆ row

uint32_t OpenXLSX::XLCellKey::row {0}

◆ sheet

std::string OpenXLSX::XLCellKey::sheet

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