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

Abstract sheet-read port for formula evaluation. More...

#include <XLEvaluationContext.hpp>

Inheritance diagram for OpenXLSX::XLEvaluationContext:
OpenXLSX::XLMapEvaluationContext OpenXLSX::XLWorksheetEvaluationContext

Public Member Functions

virtual ~XLEvaluationContext ()=default
virtual XLCellValue cellValue (std::string_view ref) const =0
 Resolve a single-cell reference to its live (or mapped) value.

Detailed Description

Abstract sheet-read port for formula evaluation.

Decouples XLFormulaEngine from concrete workbook types. Implementations resolve a single-cell reference string (e.g. "A1", "$B$2", "Sheet1!C3", or quoted 'My Sheet'!A1) to an XLCellValue. Range expansion remains the engine's responsibility; only single-cell refs are requested.

Unknown / out-of-range cells should return an empty XLCellValue{}.

Constructor & Destructor Documentation

◆ ~XLEvaluationContext()

virtual OpenXLSX::XLEvaluationContext::~XLEvaluationContext ( )
virtualdefault

Member Function Documentation

◆ cellValue()

virtual XLCellValue OpenXLSX::XLEvaluationContext::cellValue ( std::string_view ref) const
nodiscardpure virtual

Resolve a single-cell reference to its live (or mapped) value.

Parameters
refRaw reference text as seen by the formula engine.

Implemented in OpenXLSX::XLMapEvaluationContext, and OpenXLSX::XLWorksheetEvaluationContext.


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