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

Abstract immutable interface for accessing cell values and formulas across spreadsheet grids. More...

#include <IXLCellProvider.hpp>

Inheritance diagram for OpenXLSX::IXLCellProvider:
OpenXLSX::XLWorksheet

Public Member Functions

virtual ~IXLCellProvider ()=default
virtual XLCellValue getCellValue (uint32_t row, uint16_t col) const =0
 Get cell value at 1-based (row, column).
virtual std::string getCellFormula (uint32_t row, uint16_t col) const =0
 Get formula string at 1-based (row, column), or empty string if no formula.
virtual bool hasCell (uint32_t row, uint16_t col) const =0
 Check if cell exists and is populated.
virtual std::string sheetName () const =0
 Get sheet name.
virtual void fetchRangeValues (const XLCellRange &range, std::vector< XLCellValue > &out) const
 Batch fetch values for a rectangular range into an output vector.

Detailed Description

Abstract immutable interface for accessing cell values and formulas across spreadsheet grids.

Decouples consumers (such as XLFormulaEngine, XLCalculationEngine, XLQuery, and data exporters) from the concrete, mutable XLWorksheet implementation. Enables lightweight mock data providers for unit testing and virtual tabular grids.

Constructor & Destructor Documentation

◆ ~IXLCellProvider()

virtual OpenXLSX::IXLCellProvider::~IXLCellProvider ( )
virtualdefault

Member Function Documentation

◆ fetchRangeValues()

virtual void OpenXLSX::IXLCellProvider::fetchRangeValues ( const XLCellRange & range,
std::vector< XLCellValue > & out ) const
inlinevirtual

Batch fetch values for a rectangular range into an output vector.

Avoids per-cell virtual dispatch overhead in tight calculation/export loops. Default implementation falls back to row/column iteration.

Reimplemented in OpenXLSX::XLWorksheet.

◆ getCellFormula()

virtual std::string OpenXLSX::IXLCellProvider::getCellFormula ( uint32_t row,
uint16_t col ) const
nodiscardpure virtual

Get formula string at 1-based (row, column), or empty string if no formula.

Implemented in OpenXLSX::XLWorksheet.

◆ getCellValue()

virtual XLCellValue OpenXLSX::IXLCellProvider::getCellValue ( uint32_t row,
uint16_t col ) const
nodiscardpure virtual

Get cell value at 1-based (row, column).

Implemented in OpenXLSX::XLWorksheet.

◆ hasCell()

virtual bool OpenXLSX::IXLCellProvider::hasCell ( uint32_t row,
uint16_t col ) const
nodiscardpure virtual

Check if cell exists and is populated.

Implemented in OpenXLSX::XLWorksheet.

◆ sheetName()

virtual std::string OpenXLSX::IXLCellProvider::sheetName ( ) const
nodiscardpure virtual

Get sheet name.

Implemented in OpenXLSX::XLWorksheet.


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