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

Namespaces

namespace  IndexLiterals
namespace  DistanceLiterals
namespace  Crypto
namespace  Formula
namespace  formula
namespace  XmlNS
namespace  XmlTag
namespace  XmlAttr
namespace  XmlOps
namespace  chart_templates

Data Structures

class  IXLCellProvider
 Abstract immutable interface for accessing cell values and formulas across spreadsheet grids. More...
class  IZipArchive
 This class functions as a wrapper around any class that provides the necessary functionality for a zip archive. More...
class  XLFilterColumn
 The XLFilterColumn class encapsulates the <filterColumn> XML node. It allows setting different kinds of filter criteria for a specific column in an AutoFilter range. More...
class  XLAutoFilter
struct  XLCellKey
 Normalized cell identity used by the calculation graph. More...
struct  XLCellKeyHash
struct  XLCalculationOptions
 Options for workbook/sheet formula recalculation (Phase C / C-deep). More...
class  XLCalculationEngine
 Sheet- or workbook-scoped formula calculation engine (Phase C). More...
class  XLCell
 An implementation class encapsulating the properties and behaviours of a spreadsheet cell. More...
class  XLCellAssignable
class  XLCellIterator
 A forward iterator for iterating over a range of cells. More...
class  XLCellRange
 Represents a rectangular area of cells within a worksheet. More...
struct  XLCoordinates
class  XLCellReference
struct  VisitXLCellValueTypeToDouble
struct  VisitXLCellValueTypeToString
class  XLCellValue
 Class encapsulating a cell value. More...
class  XLCellValueProxy
 The XLCellValueProxy class is used for proxy (or placeholder) objects for XLCellValue objects. More...
struct  XLCompareVisitor
class  XLChartSeries
struct  XLChartAnchor
class  XLAxis
class  XLChart
class  XLChartsheet
 Class representing an Excel chartsheet. More...
class  XLColor
class  XLColumn
class  XLCommand
class  XLQuery
class  XLComment
 An encapsulation of a comment element. More...
class  XLComments
 The XLComments class is the base class for worksheet comments. More...
class  XLCfvo
class  XLCfColorScale
class  XLCfDataBar
class  XLCfIconSet
class  XLCfRule
class  XLCfRules
class  XLConditionalFormat
class  XLConditionalFormats
struct  XLRowIndex
struct  XLColIndex
class  XLDistance
class  XLContentItem
class  XLContentTypes
 The purpose of this class is to load, store add and save item in the [Content_Types].xml file. More...
struct  XLDataValidationConfig
class  XLDataValidation
class  XLDataValidations
class  XLDateTime
 Manages date and time values according to the Excel 1900 date system. More...
class  XLDocument
 This class encapsulates the concept of an excel file. It is different from the XLWorkbook, in that an XLDocument holds an XLWorkbook together with its metadata, as well as methods for opening, closing and saving the document.
The XLDocument is the entrypoint for clients using the RapidXLSX library.. More...
class  XLShapeClientData
 An encapsulation of a shape client data element x:ClientData. More...
struct  XLShapeStyleAttribute
class  XLShapeStyle
class  XLShape
struct  XLVectorShapeOptions
class  XLDrawingItem
class  XLDrawing
 The XLDrawing class is the base class for worksheet drawings (images, charts, etc.). More...
class  XLVmlDrawing
 The XLVmlDrawing class is the base class for worksheet comments. More...
class  XLEMUConverter
 Utility for handling Excel's complex coordinate and measurement conversions. Excel uses EMU (English Metric Units) for drawings. 1 inch = 914400 EMUs. At 96 DPI (Standard), 1 pixel = 9525 EMUs. More...
class  XLEvaluationContext
 Abstract sheet-read port for formula evaluation. More...
class  XLMapEvaluationContext
 In-memory evaluation context for unit tests and offline formula checks. More...
class  XLWorksheetEvaluationContext
 Evaluation context backed by a live worksheet (and its workbook for sheet-qualified refs). More...
class  XLException
class  XLOverflowError
class  XLValueTypeError
class  XLCellAddressError
class  XLInputError
class  XLInternalError
class  XLPropertyError
class  XLSheetError
class  XLDateTimeError
class  XLFormulaError
class  XLFormula
 The XLFormula class encapsulates the concept of an Excel formula. The class is essentially a wrapper around a std::string. More...
class  XLFormulaProxy
 The XLFormulaProxy serves as a placeholder for XLFormula objects. This enable getting and setting formulas through the same interface. More...
struct  XLToken
 A single lexical token from a formula string. More...
class  XLFormulaLexer
 Tokenises a raw Excel formula string (with or without leading '='). More...
struct  XLASTNode
 Polymorphic AST node. Uses a tagged-union approach with std::unique_ptr children. More...
struct  XLFormulaDiagnostic
class  XLFormulaDiagnosticReporter
class  XLFormulaParser
 Recursive-descent (Pratt) parser that converts a token stream into an AST. More...
class  XLEvalSession
 Per-evaluation session shared by the engine and session-aware functions. More...
class  XLEvalCallGuard
 RAII guard that pairs XLEvalSession::enterCall / leaveCall. More...
class  XLEvalNodeGuard
 RAII guard that pairs XLEvalSession::enterNodeEval / leaveNodeEval. More...
class  XLEvalCellGuard
 RAII guard that tracks evaluating cell references for circular reference detection. More...
class  XLFormulaArg
 Lightweight formula evaluation engine. More...
struct  XLSpillResult
 Result of a checked spill attempt (dynamic-array #SPILL! support). More...
class  XLFormulaEngine
class  XLFormulaFunction
 Abstract formula function interface (session-aware, array-capable). More...
class  XLSimpleFormulaFunction
 Adapter for pure scalar functions that only inspect argument values. More...
class  XLSessionFormulaFunction
 Adapter for session-aware scalar functions (return single XLCellValue). More...
class  XLArrayFormulaFunction
 Adapter for array-returning functions (FILTER, UNIQUE, SORT, …). More...
struct  FormulaStringViewHash
class  XLFormulaRegistry
struct  XLImageOptions
 Options for inserting an image into a worksheet. More...
struct  XLImageSize
class  XLImageParser
 Parses binary image headers (PNG, JPG, GIF) to extract width and height without external dependencies. More...
class  XLInternalAccess
 Passkey Idiom for internal access control. Only the specified friend classes can instantiate this passkey. This prevents public API users from calling internal XLDocument methods. More...
class  XLMergeCells
 Manages merged cell ranges in a worksheet. More...
struct  XLFormatToken
struct  FormatSection
class  XLNumberFormatter
class  XLPackagePartFactory
 Abstract factory for worksheet-facing package parts. More...
class  XLPackageServices
 Abstract package services port (archive + XML parts + relationships + content types). More...
class  XLPageMargins
 A class representing the page margins of a worksheet. More...
class  XLPrintOptions
 A class representing the print options of a worksheet. More...
class  XLHeaderFooter
 A class representing the page setup of a worksheet. More...
class  XLPageSetup
struct  XLPivotShowValuesAsOptions
struct  XLPivotField
class  XLPivotTableOptions
class  XLPivotTable
class  XLPivotCacheDefinition
class  XLPivotCacheRecords
class  XLProperties
 The XLProperties class represents the core properties of the document (docProps/core.xml). More...
class  XLAppProperties
 The XLAppProperties class represents the extended/application properties (docProps/app.xml). More...
class  XLCustomProperties
 The XLCustomProperties class represents custom user-defined properties (docProps/custom.xml). More...
class  XLRelationshipItem
class  XLRelationships
class  XLRichTextRun
 A class representing a single run of rich text. More...
class  XLRichText
 A class representing rich text in a cell. More...
class  XLRow
 The XLRow class represent a row in an Excel spreadsheet. Using XLRow objects, various row formatting options can be set and modified. More...
class  XLRowIterator
class  XLRowRange
class  XLRowDataIterator
 This class encapsulates a (non-const) iterator, for iterating over the cells in a row. More...
class  XLRowDataRange
 This class encapsulates the concept of a contiguous range of cells in a row. More...
class  XLRowDataProxy
 The XLRowDataProxy is used as a proxy object when getting or setting row data. The class facilitates easy conversion to/from containers. More...
struct  StringViewHash
struct  XLSharedStringsState
class  XLSharedStrings
 This class encapsulate the Excel concept of Shared Strings. In Excel, instead of havig individual strings in each cell, cells have a reference to an entry in the SharedStrings register. This results in smalle file sizes, as repeated strings are referenced easily. More...
class  XLSharedStringTable
 Abstract read-only view of the workbook shared string table. More...
class  XLMapSharedStringTable
 In-memory read-only SST for unit tests and offline consumers (no document required). More...
class  XLSheet
 The XLAbstractSheet is a generalized sheet class, which functions as superclass for specialized classes, such as XLWorksheet. It implements functionality common to all sheet types. This is a pure abstract class, so it cannot be instantiated. More...
class  XLSheetBase
 The XLSheetBase class is the base class for the XLWorksheet and XLChartsheet classes. However, it is not a base class in the traditional sense. Rather, it provides common functionality that is inherited via the CRTP (Curiously Recurring Template Pattern) pattern. More...
class  XLSlicer
class  XLSlicerCache
class  XLSlicerBuilder
class  XLSlicerCollection
struct  XLSparklineOptions
 The XLSparklineOptions struct encapsulates configuration for a sparkline group. More...
class  XLSparkline
 The XLSparkline class encapsulates a single sparkline group in a worksheet. More...
struct  XLStreamReadOptions
 Options for XLStreamReader construction. More...
struct  XLStreamCellView
 Rich view of a single streamed cell (value + formula + style). More...
class  XLStreamColumns
 Column-oriented cursor over a worksheet (excelize Cols-like). More...
struct  XLStreamRowOptsView
 Row-level attributes for the last consumed physical/logical row (excelize GetRowOpts). More...
class  XLStreamReader
struct  XLStreamWriteOptions
 Options for XLStreamWriter construction. More...
struct  XLStreamPanesOptions
 Structured freeze/split panes for stream writers (excelize SetPanes equivalent). More...
struct  XLStreamRowOpts
 Optional row-level attributes for streaming writes (excelize RowOpts equivalent). More...
struct  XLStreamTableOptions
 Minimal table definition for streaming AddTable (excelize-compatible constraints). More...
 Stream hyperlink (injected as <hyperlinks> on close; external uses sheet relationships). More...
class  XLStreamCell
 A structure that represents a cell to be appended via the streaming API. More...
class  XLStreamWriter
class  XLStringArena
 String memory pool (Arena Allocator) with block recycling. More...
struct  XLStyle
 A high-level, human-ergonomic structure representing the styling of a cell or range. This acts as a builder and facade over the complex underlying OpenXLSX XLStyles system. More...
struct  XLStyleHash
class  XLStyles
 An encapsulation of the styles file (xl/styles.xml) in an Excel document package. More...
class  XLLine
class  XLBorder
 An encapsulation of a border item. More...
class  XLBorders
 An encapsulation of the XLSX borders. More...
class  XLAlignment
class  XLCellFormat
 An encapsulation of a cell format item. More...
class  XLCellFormats
 An encapsulation of the XLSX cell style formats. More...
class  XLCellStyle
class  XLCellStyles
 An encapsulation of the XLSX cell styles. More...
class  XLDxf
class  XLDxfs
 An encapsulation of the XLSX differential cell formats (dxfs). More...
class  XLDataBarColor
class  XLGradientStop
 An encapsulation of an fill::gradientFill::stop item. More...
class  XLGradientStops
 An encapsulation of an array of fill::gradientFill::stop items. More...
class  XLFill
 An encapsulation of a fill item. More...
class  XLFills
 An encapsulation of the XLSX fills. More...
class  XLFont
class  XLFonts
 An encapsulation of the XLSX fonts. More...
class  XLNumberFormat
class  XLNumberFormats
 An encapsulation of the XLSX number formats (numFmts). More...
class  XLTableColumn
 The XLTableColumn class encapsulates the <tableColumn> XML node. It allows setting different kinds of column properties in a table. More...
struct  XLSlicerOptions
class  XLTableCollection
 The XLTableCollection class manages multiple tables within a worksheet. More...
class  XLTable
 The XLTable class represents a single Excel table (.xml file). More...
class  XLThreadedComment
 A proxy class encapsulating a single modern threaded comment. More...
class  XLThreadedComments
 A class encapsulating modern Excel threaded comments (ThreadedComments.xml). More...
class  XLPerson
 A proxy class encapsulating a single person (author) entity. More...
class  XLPersons
 A class encapsulating modern Excel persons metadata (persons.xml). More...
class  XLDefinedName
 A class representing a single defined name in a workbook. More...
class  XLDefinedNames
 A class representing the collection of defined names in a workbook. More...
class  XLWorkbook
 This class encapsulates the concept of a Workbook. It provides access to the individual sheets (worksheets or chartsheets), as well as functionality for adding, deleting, moving and renaming sheets. More...
struct  XLSheetProtectionOptions
 A structure defining all granular sheet protection options. More...
class  XLWorksheet
 A class encapsulating an Excel worksheet. Access to XLWorksheet objects should be via the workbook object. More...
struct  XLWorksheetImpl
struct  XLAllocatedMemory
 Auto-managed malloc memory for Zero-Copy serialization. More...
class  XLXmlData
 The XLXmlData class encapsulates the properties and behaviour of the .xml files in an .xlsx file zip package. Objects of the XLXmlData type are intended to be stored centrally in an XLDocument object, from where they can be retrieved by other objects that encapsulates the behaviour of Excel elements, such as XLWorkbook and XLWorksheet. More...
class  XLUnsupportedElement
 The XLUnsupportedElement class provides a stub implementation that can be used as function parameter or return type for currently unsupported XML features. More...
class  XLXmlFile
 The XLXmlFile class provides an interface for derived classes to use. It functions as an ancestor to all classes which are represented by an .xml file in an .xlsx package. More...
struct  XMLParseResult
class  NameProxy
class  OpenXLSX_xml_node
class  XMLAttribute
class  XMLText
class  XMLNodeIterator
class  XMLNodeRange
class  XMLAttributeIterator
class  XMLAttributeRange
class  OpenXLSX_xml_document
class  XLXmlSavingDeclaration
 The XLXmlSavingDeclaration class encapsulates the properties of an XML saving declaration, that can be used in calls to XLXmlData::getRawData to enforce specific settings. More...
struct  XLTableProperties
 Plain POD properties describing an OOXML Table (ECMA-376. More...
struct  XLRowProperties
 Plain POD properties describing an OOXML Row (<row> element). More...
struct  XLColumnProperties
 Plain POD properties describing an OOXML Column (<col> element). More...
struct  XLPaneProperties
 Value-semantic POD properties describing worksheet window panes and freeze state. More...
class  CellNodeView
 Zero-overhead typed view proxy over a raw XML cell node (). More...
class  XLZipArchive
class  ShardedAstCache
struct  EnumStringMap

Typedefs

using XLCellResolver = std::function<XLCellValue(std::string_view ref)>
 Callback type: resolves a cell reference string to a cell value.
using XLNameResolver = std::function<std::optional<std::string>(std::string_view name)>
 Optional callback: resolve a defined name to a formula/reference string.
using XLSpillWriter = std::function<void(uint32_t row, uint16_t col, const XLCellValue& value)>
 Callback used by spillArray to write one spill cell (1-based Excel coordinates).
using XLSpillOccupancy = std::function<bool(uint32_t row, uint16_t col)>
 Callback: return true if (row,col) is occupied and must not be overwritten by a spill (except the formula anchor cell itself).
typedef int32_t XLMergeIndex
template<typename Key, typename Value>
using FlatHashMap = ankerl::unordered_dense::map<Key, Value, StringViewHash, std::equal_to<>>
typedef std::reference_wrapper< const XLSharedStrings > XLSharedStringsRef
using XLStyleIndex = size_t
using XLDiffCellFormat = XLDxf
 Backward compatibility alias.
using XLDiffCellFormats = XLDxfs
 Backward compatibility alias.
using XLTables = XLTableCollection
using XMLNode = OpenXLSX_xml_node
using XMLDocument = OpenXLSX_xml_document
using XMLNodeType = int
using XMLParseStatus = int

Enumerations

enum class  XLFilterLogic { And , Or }
 Enum class defining the logical operator for custom filters. More...
enum class  XLCalcStatus : uint8_t { Ok = 0 , Circular , Error , Empty }
 Result status for a single calcCellValue / recalculate step. More...
enum class  XLValueType {
  Empty , Boolean , Integer , Float ,
  Error , String , RichText
}
 Enum defining the valid value types for a an Excel spreadsheet cell. More...
enum class  XLChartType {
  Bar , BarStacked , BarPercentStacked , Bar3D ,
  Bar3DStacked , Bar3DPercentStacked , Column , ColumnStacked ,
  ColumnPercentStacked , Column3D , Column3DStacked , Column3DPercentStacked ,
  Line , LineStacked , LinePercentStacked , Line3D ,
  Pie , Pie3D , Scatter , ScatterLine ,
  ScatterLineMarker , ScatterSmooth , ScatterSmoothMarker , ScatterMarker ,
  Bubble , StockHLC , StockOHLC , Surface ,
  Surface3D , SurfaceWireframe , Surface3DWireframe , Area ,
  AreaStacked , AreaPercentStacked , Area3D , Area3DStacked ,
  Area3DPercentStacked , Doughnut , Radar , RadarFilled ,
  RadarMarkers , PieOfPie , BarOfPie
}
enum class  XLLegendPosition {
  Bottom , Left , Right , Top ,
  TopRight , Hidden
}
enum class  XLMarkerStyle {
  None , Circle , Dash , Diamond ,
  Dot , Picture , Plus , Square ,
  Star , Triangle , X , Default
}
enum class  XLLineDashType {
  Unset , Solid , Dot , Dash ,
  LgDash , DashDot , LgDashDot , LgDashDotDot ,
  SysDash , SysDot , SysDashDot
}
enum class  XLAxisTickLabelPosition { NextToAxis , High , Low , None }
enum class  XLErrorBarDirection { X , Y }
enum class  XLErrorBarType { Both , Minus , Plus }
enum class  XLErrorBarValueType {
  Custom , FixedValue , Percentage , StandardDeviation ,
  StandardError
}
enum class  XLTrendlineType {
  Linear , Exponential , Logarithmic , Polynomial ,
  Power , MovingAverage
}
enum class  XLAxisOrientation { MinMax , MaxMin }
enum class  XLAxisCrosses { AutoZero , Min , Max }
enum class  XLCommandType : uint8_t {
  SetSheetName , SetSheetVisibility , SetSheetIndex , SetSheetActive ,
  ResetCalcChain , SetFullCalcOnLoad , CheckAndFixCoreProperties , CheckAndFixExtendedProperties ,
  CheckAndFixCustomProperties , AddSharedStrings , AddWorksheet , AddChartsheet ,
  DeleteSheet , CloneSheet , AddStyles
}
enum class  XLQueryType : uint8_t {
  QuerySheetName , QuerySheetIndex , QuerySheetVisibility , QuerySheetIsActive ,
  QuerySheetType , QuerySheetID , QuerySheetRelsID , QuerySheetRelsTarget ,
  QuerySharedStrings , QueryXmlData
}
enum class  XLCfType : uint8_t {
  Expression = 0 , CellIs = 1 , ColorScale = 2 , DataBar = 3 ,
  IconSet = 4 , Top10 = 5 , UniqueValues = 6 , DuplicateValues = 7 ,
  ContainsText = 8 , NotContainsText = 9 , BeginsWith = 10 , EndsWith = 11 ,
  ContainsBlanks = 12 , NotContainsBlanks = 13 , ContainsErrors = 14 , NotContainsErrors = 15 ,
  TimePeriod = 16 , AboveAverage = 17 , Invalid = 255
}
enum class  XLCfOperator : uint8_t {
  LessThan = 0 , LessThanOrEqual = 1 , Equal = 2 , NotEqual = 3 ,
  GreaterThanOrEqual = 4 , GreaterThan = 5 , Between = 6 , NotBetween = 7 ,
  ContainsText = 8 , NotContains = 9 , BeginsWith = 10 , EndsWith = 11 ,
  Invalid = 255
}
enum class  XLCfTimePeriod : uint8_t {
  Today = 0 , Yesterday = 1 , Tomorrow = 2 , Last7Days = 3 ,
  ThisMonth = 4 , LastMonth = 5 , NextMonth = 6 , ThisWeek = 7 ,
  LastWeek = 8 , NextWeek = 9 , Invalid = 255
}
enum class  XLCfvoType : uint8_t {
  Min = 0 , Max = 1 , Number = 2 , Percent = 3 ,
  Formula = 4 , Percentile = 5 , Invalid = 255
}
enum class  XLDataBarDirection : uint8_t { Context = 0 , LeftToRight = 1 , RightToLeft = 2 }
enum class  XLDataBarAxisPosition : uint8_t { Automatic = 0 , Middle = 1 , None = 2 }
enum class  XLContentType : uint8_t {
  Workbook , Relationships , WorkbookMacroEnabled , Worksheet ,
  Chartsheet , ExternalLink , Theme , Styles ,
  SharedStrings , Drawing , Chart , ChartStyle ,
  ChartColorStyle , ControlProperties , CalculationChain , VBAProject ,
  CoreProperties , ExtendedProperties , CustomProperties , Comments ,
  Table , VMLDrawing , Hyperlink , Unknown ,
  PivotTable , Slicer , SlicerCache , PivotCacheDefinition ,
  PivotCacheRecords , ThreadedComments , Persons
}
enum class  XLDataValidationType {
  None , Custom , Date , Decimal ,
  List , TextLength , Time , Whole
}
enum class  XLDataValidationOperator {
  Between , Equal , GreaterThan , GreaterThanOrEqual ,
  LessThan , LessThanOrEqual , NotBetween , NotEqual
}
enum class  XLDataValidationErrorStyle { Stop , Warning , Information }
enum class  XLIMEMode {
  NoControl , Off , On , Disabled ,
  Hiragana , FullKatakana , HalfKatakana , FullAlpha ,
  HalfAlpha , FullHangul , HalfHangul
}
 IME (Input Method Editor) mode for data validation. More...
enum class  XLProperty {
  Title , Subject , Creator , Keywords ,
  Description , LastModifiedBy , LastPrinted , CreationDate ,
  ModificationDate , Category , Application , DocSecurity ,
  ScaleCrop , Manager , Company , LinksUpToDate ,
  SharedDoc , HyperlinkBase , HyperlinksChanged , AppVersion
}
 The XLDocumentProperties class is an enumeration of the possible properties (metadata) that can be set for a XLDocument object (and .xlsx file). More...
enum class  XLShapeTextVAlign : uint8_t { Center = 3 , Top = 4 , Bottom = 5 , Invalid = 255 }
enum class  XLShapeTextHAlign : uint8_t { Left = 1 , Right = 2 , Center = 3 , Invalid = 255 }
enum class  XLVectorShapeType {
  Rectangle , Ellipse , Line , Triangle ,
  RightTriangle , Arrow , Diamond , Parallelogram ,
  Hexagon , Star4 , Star5 , Star16 ,
  Star24 , Heart , SmileyFace , Cloud ,
  Donut , Ribbon , Sun , Moon ,
  LightningBolt , FlowChartProcess , FlowChartDecision , FlowChartDocument ,
  FlowChartData
}
 An encapsulation of a drawing item (e.g. an image). More...
enum class  XLDynamicFilterType {
  Null , AboveAverage , BelowAverage , Tomorrow ,
  Today , Yesterday , NextWeek , ThisWeek ,
  LastWeek , NextMonth , ThisMonth , LastMonth ,
  NextQuarter , ThisQuarter , LastQuarter , NextYear ,
  ThisYear , LastYear , YearToDate , Q1 ,
  Q2 , Q3 , Q4 , M1 ,
  M2 , M3 , M4 , M5 ,
  M6 , M7 , M8 , M9 ,
  M10 , M11 , M12
}
 Enum defining all valid dynamic filter types according to ECMA-376 18.18.25. More...
enum class  XLTokenKind : uint8_t {
  Number , String , Bool , CellRef ,
  Ident , Plus , Minus , Star ,
  Slash , Caret , Percent , Amp ,
  Eq , NEq , Lt , Le ,
  Gt , Ge , LParen , RParen ,
  Comma , Semicolon , Colon , LBrace ,
  RBrace , End , Error
}
 Kinds of tokens produced by the lexer. More...
enum class  XLNodeKind : uint8_t {
  Number , StringLit , BoolLit , CellRef ,
  Range , BinOp , UnaryOp , FuncCall ,
  ArrayLit , ErrorLit
}
 Kind discriminator for AST nodes. More...
enum class  XLImagePositioning { OneCell , TwoCell , Absolute }
 Determines how an image behaves when cells are resized or inserted/deleted. More...
enum class  XLIteratorDirection { Forward , Reverse }
enum class  XLIteratorLocation { Begin , End }
enum class  XLFormatTokenType {
  Literal , Year , Month , Day ,
  Hour , Minute , Second , AMPM ,
  DigitZero , DigitOpt , Decimal , Thousands ,
  Percent , TextPlaceholder
}
enum class  XLPageOrientation { Default , Portrait , Landscape }
 Enum defining page orientation. More...
enum class  XLPivotSubtotal {
  Sum , Average , Count , Max ,
  Min , Product , CountNums , StdDev ,
  StdDevP , Var , VarP
}
enum class  XLPivotShowValuesAs : uint8_t {
  Normal = 0 , PercentOfGrandTotal , PercentOfColumnTotal , PercentOfRowTotal ,
  PercentOf , PercentOfParentRowTotal , PercentOfParentColumnTotal , PercentOfParentTotal ,
  DifferenceFrom , PercentDifferenceFrom , RunningTotalIn , PercentRunningTotalIn ,
  RankSmallestToLargest , RankLargestToSmallest , Index
}
 "Show Values As" calculation for pivot data fields (OOXML showDataAs / x14:dataField). More...
enum class  XLRelationshipType {
  CoreProperties , ExtendedProperties , CustomProperties , Workbook ,
  Worksheet , Chartsheet , Dialogsheet , Macrosheet ,
  CalculationChain , ExternalLink , ExternalLinkPath , Theme ,
  Styles , Chart , ChartStyle , ChartColorStyle ,
  Image , Drawing , VMLDrawing , SharedStrings ,
  PrinterSettings , VBAProject , ControlProperties , Comments ,
  Table , Hyperlink , Unknown , PivotTable ,
  Slicer , SlicerCache , PivotCacheDefinition , PivotCacheRecords ,
  ThreadedComments , Person
}
 An enum of the possible relationship (or XML document) types used in relationship (.rels) XML files. More...
enum class  XLSheetState : uint8_t { Visible , Hidden , VeryHidden }
 The XLSheetState is an enumeration of the possible (visibility) states, e.g. Visible or Hidden. More...
enum class  XLPaneState : uint8_t { Split , Frozen , FrozenSplit }
 The XLPaneState is an enumeration of the possible states of a pane, e.g. Frozen or Split. More...
enum class  XLPane : uint8_t { BottomRight , TopRight , BottomLeft , TopLeft }
 The XLPane is an enumeration of the possible pane identifiers. More...
enum class  XLSlicerStyle : uint8_t {
  Light1 = 0 , Light2 , Light3 , Light4 ,
  Light5 , Light6 , Dark1 , Dark2 ,
  Dark3 , Dark4 , Dark5 , Dark6 ,
  Other1 , Other2 , Custom = 255
}
enum class  XLSparklineType { Line , Column , Stacked }
 The XLSparklineType enum represents the type of a sparkline. More...
enum class  XLStreamEmptyRowPolicy : uint8_t { SkipMissingRows = 0 , EmitEmptyRows = 1 }
 Policy for logical row gaps (missing <row> elements in sheetData). More...
enum class  XLStreamSharedStringMode : uint8_t { Eager = 0 , Indexed = 1 }
 How shared-string cells (t="s") are resolved during streaming reads. More...
enum class  XLStreamOpenMode : uint8_t { Auto = 0 , Fresh = 1 , Hybrid = 2 }
 How streamWriter materializes the worksheet header. More...
enum class  XLStreamDimensionMode : uint8_t { FixedSlot = 0 , OmitPatch = 1 }
 How <dimension> is finalized on close without reloading the full sheet XML. More...
enum class  XLStreamFormulaType : uint8_t { Normal = 0 , Array , Shared , DataTable }
 Formula type attributes for shared / array formulas (OOXML <f t=…>). More...
enum  XLUnderlineStyle : uint8_t {
  XLUnderlineNone = 0 , XLUnderlineSingle = 1 , XLUnderlineDouble = 2 , XLUnderlineSingleAccounting = 3 ,
  XLUnderlineDoubleAccounting = 4 , XLUnderlineInvalid = 255
}
enum  XLFontSchemeStyle : uint8_t { XLFontSchemeNone = 0 , XLFontSchemeMajor = 1 , XLFontSchemeMinor = 2 , XLFontSchemeInvalid = 255 }
enum  XLVerticalAlignRunStyle : uint8_t { XLBaseline = 0 , XLSubscript = 1 , XLSuperscript = 2 , XLVerticalAlignRunInvalid = 255 }
enum  XLFillType : uint8_t { XLGradientFill = 0 , XLPatternFill = 1 , XLFillTypeInvalid = 255 }
enum  XLGradientType : uint8_t { XLGradientLinear = 0 , XLGradientPath = 1 , XLGradientTypeInvalid = 255 }
enum  XLPatternType : uint8_t {
  XLPatternNone = 0 , XLPatternSolid = 1 , XLPatternMediumGray = 2 , XLPatternDarkGray = 3 ,
  XLPatternLightGray = 4 , XLPatternDarkHorizontal = 5 , XLPatternDarkVertical = 6 , XLPatternDarkDown = 7 ,
  XLPatternDarkUp = 8 , XLPatternDarkGrid = 9 , XLPatternDarkTrellis = 10 , XLPatternLightHorizontal = 11 ,
  XLPatternLightVertical = 12 , XLPatternLightDown = 13 , XLPatternLightUp = 14 , XLPatternLightGrid = 15 ,
  XLPatternLightTrellis = 16 , XLPatternGray125 = 17 , XLPatternGray0625 = 18 , XLPatternTypeInvalid = 255
}
enum  XLLineType : uint8_t {
  XLLineLeft = 0 , XLLineRight = 1 , XLLineTop = 2 , XLLineBottom = 3 ,
  XLLineDiagonal = 4 , XLLineVertical = 5 , XLLineHorizontal = 6 , XLLineInvalid = 255
}
enum  XLLineStyle : uint8_t {
  XLLineStyleNone = 0 , XLLineStyleThin = 1 , XLLineStyleMedium = 2 , XLLineStyleDashed = 3 ,
  XLLineStyleDotted = 4 , XLLineStyleThick = 5 , XLLineStyleDouble = 6 , XLLineStyleHair = 7 ,
  XLLineStyleMediumDashed = 8 , XLLineStyleDashDot = 9 , XLLineStyleMediumDashDot = 10 , XLLineStyleDashDotDot = 11 ,
  XLLineStyleMediumDashDotDot = 12 , XLLineStyleSlantDashDot = 13 , XLLineStyleInvalid = 255
}
enum  XLAlignmentStyle : uint8_t {
  XLAlignGeneral = 0 , XLAlignLeft = 1 , XLAlignRight = 2 , XLAlignCenter = 3 ,
  XLAlignTop = 4 , XLAlignBottom = 5 , XLAlignFill = 6 , XLAlignJustify = 7 ,
  XLAlignCenterContinuous = 8 , XLAlignDistributed = 9 , XLAlignInvalid = 255
}
enum  XLReadingOrder : uint32_t { XLReadingOrderContextual = 0 , XLReadingOrderLeftToRight = 1 , XLReadingOrderRightToLeft = 2 }
enum class  XLTotalsRowFunction {
  None , Sum , Min , Max ,
  Average , Count , CountNums , StdDev ,
  Var , Custom
}
 Enum class defining the possible functions for a table's totals row. More...
enum class  XLSheetType { Worksheet , Chartsheet , Dialogsheet , Macrosheet }
 Enumeration of the different types of sheets. More...

Functions

bool operator== (const XLCell &lhs, const XLCell &rhs)
bool operator!= (const XLCell &lhs, const XLCell &rhs)
std::ostream & operator<< (std::ostream &os, const XLCell &c)
 ostream output of XLCell content
std::ostream & operator<< (std::ostream &os, const XLCellAssignable &c)
 ostream output of XLCellAssignable content
XMLNode findRowNode (XMLNode sheetDataNode, uint32_t rowNumber)
 locate the XML row node within sheetDataNode for the row at rowNumber
XMLNode findCellNode (XMLNode rowNode, uint16_t columnNumber)
 locate the XML cell node within rownode for the cell at columnNumber
std::ostream & operator<< (std::ostream &os, const XLCellIterator &it)
bool operator== (const XLCellReference &lhs, const XLCellReference &rhs)
 Determines exact coordinate identity, allowing comparisons without resolving their DOM node equivalence.
bool operator!= (const XLCellReference &lhs, const XLCellReference &rhs)
 Detects coordinate divergence, effectively identical to !(lhs == rhs).
bool operator< (const XLCellReference &lhs, const XLCellReference &rhs)
 Evaluates precedence primarily by row, then by column, allowing cell ranges to be sorted efficiently and sequentially from left-to-right, top-to-bottom.
bool operator> (const XLCellReference &lhs, const XLCellReference &rhs)
 Inverts the less-than operator logic to verify strict left-to-right, top-to-bottom traversal dominance.
bool operator<= (const XLCellReference &lhs, const XLCellReference &rhs)
 Asserts whether a cell sequentially precedes or occupies the exact same coordinate as another.
bool operator>= (const XLCellReference &lhs, const XLCellReference &rhs)
 Asserts whether a cell sequentially follows or occupies the exact same coordinate as another.
bool operator== (const XLCellValue &lhs, const XLCellValue &rhs)
bool operator!= (const XLCellValue &lhs, const XLCellValue &rhs)
bool operator< (const XLCellValue &lhs, const XLCellValue &rhs)
bool operator> (const XLCellValue &lhs, const XLCellValue &rhs)
bool operator<= (const XLCellValue &lhs, const XLCellValue &rhs)
bool operator>= (const XLCellValue &lhs, const XLCellValue &rhs)
std::ostream & operator<< (std::ostream &os, const XLCellValue &value)
std::ostream & operator<< (std::ostream &os, const XLCellValueProxy &value)
bool operator== (const XLColor &lhs, const XLColor &rhs)
 Checks if two colors have identical ARGB channels.
bool operator!= (const XLColor &lhs, const XLColor &rhs)
 Checks if two colors differ in any of their ARGB channels.
OPENXLSX_EXPORT XLCfType XLCfTypeFromString (std::string const &typeString)
 get the correct XLCfType from the OOXML cfRule type attribute string
OPENXLSX_EXPORT std::string XLCfTypeToString (XLCfType cfType)
 inverse of XLCfTypeFromString
OPENXLSX_EXPORT XLCfOperator XLCfOperatorFromString (std::string const &operatorString)
 get the correct XLCfOperator from the OOXML cfRule operator attribute string
OPENXLSX_EXPORT std::string XLCfOperatorToString (XLCfOperator cfOperator)
 inverse of XLCfOperatorFromString
OPENXLSX_EXPORT XLCfTimePeriod XLCfTimePeriodFromString (std::string const &timePeriodString)
 get the correct XLCfTimePeriod from the OOXML cfRule timePeriod attribute string
OPENXLSX_EXPORT std::string XLCfTimePeriodToString (XLCfTimePeriod cfTimePeriod)
 inverse of XLCfTimePeriodFromString
OPENXLSX_EXPORT XLCfvoType XLCfvoTypeFromString (std::string const &cfvoTypeString)
OPENXLSX_EXPORT std::string XLCfvoTypeToString (XLCfvoType cfvoType)
OPENXLSX_EXPORT XLDataBarDirection XLDataBarDirectionFromString (std::string const &directionString)
OPENXLSX_EXPORT std::string XLDataBarDirectionToString (XLDataBarDirection direction)
OPENXLSX_EXPORT XLDataBarAxisPosition XLDataBarAxisPositionFromString (std::string const &positionString)
OPENXLSX_EXPORT std::string XLDataBarAxisPositionToString (XLDataBarAxisPosition position)
OPENXLSX_EXPORT XLCfRule XLColorScaleRule (const XLColor &minColor, const XLColor &maxColor)
OPENXLSX_EXPORT XLCfRule XLColorScaleRule (const XLColor &minColor, const XLColor &midColor, const XLColor &maxColor)
OPENXLSX_EXPORT XLCfRule XLDataBarRule (const XLColor &color, bool showValue=true)
OPENXLSX_EXPORT XLCfRule XLCellIsRule (XLCfOperator op, const std::string &value)
OPENXLSX_EXPORT XLCfRule XLCellIsRule (const std::string &op, const std::string &value)
OPENXLSX_EXPORT XLCfRule XLFormulaRule (const std::string &formula)
OPENXLSX_EXPORT XLCfRule XLIconSetRule (const std::string &iconSetName="3TrafficLights1", bool showValue=true, bool reverse=false)
OPENXLSX_EXPORT XLCfRule XLTop10Rule (uint16_t rank=10, bool percent=false, bool bottom=false)
OPENXLSX_EXPORT XLCfRule XLAboveAverageRule (bool aboveAverage=true, bool equalAverage=false, int16_t stdDev=0)
OPENXLSX_EXPORT XLCfRule XLDuplicateValuesRule (bool unique=false)
OPENXLSX_EXPORT XLCfRule XLContainsTextRule (const std::string &text)
OPENXLSX_EXPORT XLCfRule XLNotContainsTextRule (const std::string &text)
OPENXLSX_EXPORT XLCfRule XLContainsBlanksRule ()
OPENXLSX_EXPORT XLCfRule XLNotContainsBlanksRule ()
OPENXLSX_EXPORT XLCfRule XLContainsErrorsRule ()
OPENXLSX_EXPORT XLCfRule XLNotContainsErrorsRule ()
XLRowIndex operator""_row (unsigned long long v)
XLColIndex operator""_col (unsigned long long v)
XLDistance operator""_px (unsigned long long px)
XLDistance operator""_cm (long double cm)
XLDistance operator""_cm (unsigned long long cm)
XLDistance operator""_inch (long double inch)
XLDistance operator""_inch (unsigned long long inch)
XLDistance operator""_pt (long double pt)
XLDistance operator""_pt (unsigned long long pt)
std::string XLContentTypeToString (XLContentType type)
 utility function: determine the name of an XLContentType value
OPENXLSX_EXPORT bool isEncryptedDocument (gsl::span< const uint8_t > data)
 Checks if a given byte stream represents an OLE CFB document.
OPENXLSX_EXPORT std::vector< uint8_t > decryptDocument (gsl::span< const uint8_t > data, const std::string &password)
 High-level API to decrypt an entire document from a buffer.
OPENXLSX_EXPORT std::vector< uint8_t > encryptDocument (gsl::span< const uint8_t > zipData, const std::string &password)
 High-level API to encrypt a ZIP package into a CFB container.
OPENXLSX_EXPORT std::string BinaryAsHexString (gsl::span< const std::byte > data)
OPENXLSX_EXPORT uint16_t ExcelPasswordHash (std::string_view password)
OPENXLSX_EXPORT std::string ExcelPasswordHashAsString (std::string_view password)
std::string getPathARelativeToPathB (std::string_view pathA, std::string_view pathB)
std::string eliminateDotAndDotDotFromPath (std::string_view path)
OPENXLSX_EXPORT std::string XLDynamicFilterTypeToString (XLDynamicFilterType type)
 Helper function to convert enum to string.
bool operator== (const XLFormula &lhs, const XLFormula &rhs)
bool operator!= (const XLFormula &lhs, const XLFormula &rhs)
std::ostream & operator<< (std::ostream &os, const XLFormula &value)
 send a formula string to an ostream
std::ostream & operator<< (std::ostream &os, const XLFormulaProxy &value)
 send a formula string to an ostream
OPENXLSX_EXPORT size_t spillArray (const XLFormulaArg &result, uint32_t topRow, uint16_t leftCol, const XLSpillWriter &write)
 Write a (possibly multi-cell) formula result into a rectangular spill range.
OPENXLSX_EXPORT bool spillRangeIsClear (const XLFormulaArg &result, uint32_t topRow, uint16_t leftCol, const XLSpillOccupancy &isOccupied, uint32_t anchorRow=0, uint16_t anchorCol=0)
 Check whether a spill rectangle is free of blocking occupants.
OPENXLSX_EXPORT XLSpillResult spillArrayChecked (const XLFormulaArg &result, uint32_t topRow, uint16_t leftCol, const XLSpillWriter &write, const XLSpillOccupancy &isOccupied, uint32_t anchorRow=0, uint16_t anchorCol=0)
 Spill with #SPILL! detection: writes only when the target range is clear.
void registerMathFunctions (XLFormulaRegistry &registry)
void registerTextFunctions (XLFormulaRegistry &registry)
void registerLogicalFunctions (XLFormulaRegistry &registry)
void registerDateTimeFunctions (XLFormulaRegistry &registry)
void registerFinancialFunctions (XLFormulaRegistry &registry)
void registerStatisticalFunctions (XLFormulaRegistry &registry)
void registerInfoFunctions (XLFormulaRegistry &registry)
void registerArrayFunctions (XLFormulaRegistry &registry)
void registerEngineeringFunctions (XLFormulaRegistry &registry)
const char * pivotShowValuesAsToString (XLPivotShowValuesAs t)
XLPivotShowValuesAs pivotShowValuesAsFromString (std::string_view s)
bool pivotShowValuesAsNeedsX14 (XLPivotShowValuesAs t)
bool pivotShowValuesAsNeedsBaseField (XLPivotShowValuesAs t)
bool pivotShowValuesAsNeedsBaseItem (XLPivotShowValuesAs t)
const char * pivotSubtotalToString (XLPivotSubtotal s)
XLPivotSubtotal pivotSubtotalFromString (std::string_view s)
void UseRandomIDs ()
 Enable use of random (relationship) IDs.
void UseSequentialIDs ()
 Disable use of random (relationship) IDs (default behavior).
uint64_t Rand64 ()
 Return a 64 bit random value (by invoking Rand32 twice).
void InitRandom (bool pseudoRandom=false)
 Initialize XLRand32 data source.
XLRichText operator+ (XLRichText lhs, const XLRichText &rhs)
XLRichText operator+ (XLRichText lhs, const std::string &rhs)
XLRichText operator+ (XLRichText lhs, const XLRichTextRun &rhs)
bool operator== (const XLRichTextRun &lhs, const XLRichTextRun &rhs)
bool operator!= (const XLRichTextRun &lhs, const XLRichTextRun &rhs)
bool operator== (const XLRichText &lhs, const XLRichText &rhs)
bool operator!= (const XLRichText &lhs, const XLRichText &rhs)
bool operator== (const XLRow &lhs, const XLRow &rhs)
bool operator!= (const XLRow &lhs, const XLRow &rhs)
bool operator< (const XLRow &lhs, const XLRow &rhs)
bool operator> (const XLRow &lhs, const XLRow &rhs)
bool operator<= (const XLRow &lhs, const XLRow &rhs)
bool operator>= (const XLRow &lhs, const XLRow &rhs)
OPENXLSX_EXPORT std::string XLPaneStateToString (XLPaneState state)
 get the correct XLPaneState from the OOXML pane state attribute string
OPENXLSX_EXPORT XLPaneState XLPaneStateFromString (std::string const &stateString)
 inverse of XLPaneStateToString
OPENXLSX_EXPORT std::string XLPaneToString (XLPane pane)
 get the correct XLPane from the OOXML pane identifier attribute string
OPENXLSX_EXPORT XLPane XLPaneFromString (std::string const &paneString)
 inverse of XLPaneToString
OPENXLSX_EXPORT void setTabColor (const XMLDocument &xmlDocument, const XLColor &color)
 Function for setting tab color.
OPENXLSX_EXPORT void setTabSelected (const XMLDocument &xmlDocument, bool selected)
 Set the tab selected property to desired value.
OPENXLSX_EXPORT bool tabIsSelected (const XMLDocument &xmlDocument)
 Function for checking if the tab is selected.
OPENXLSX_EXPORT std::string xlSlicerStyleToString (XLSlicerStyle style)
 Convert XLSlicerStyle enum to its Excel XML string representation.
OPENXLSX_EXPORT XLSlicerStyle xlSlicerStyleFromString (std::string_view s)
 Convert a raw style string to XLSlicerStyle enum (Custom if unrecognized).
bool operator== (const XLStyle::Font &lhs, const XLStyle::Font &rhs) noexcept
bool operator!= (const XLStyle::Font &lhs, const XLStyle::Font &rhs) noexcept
bool operator== (const XLStyle::Fill &lhs, const XLStyle::Fill &rhs) noexcept
bool operator!= (const XLStyle::Fill &lhs, const XLStyle::Fill &rhs) noexcept
bool operator== (const XLStyle::BorderElement &lhs, const XLStyle::BorderElement &rhs) noexcept
bool operator!= (const XLStyle::BorderElement &lhs, const XLStyle::BorderElement &rhs) noexcept
bool operator== (const XLStyle::Border &lhs, const XLStyle::Border &rhs) noexcept
bool operator!= (const XLStyle::Border &lhs, const XLStyle::Border &rhs) noexcept
bool operator== (const XLStyle::Alignment &lhs, const XLStyle::Alignment &rhs) noexcept
bool operator!= (const XLStyle::Alignment &lhs, const XLStyle::Alignment &rhs) noexcept
bool operator== (const XLStyle &lhs, const XLStyle &rhs) noexcept
bool operator!= (const XLStyle &lhs, const XLStyle &rhs) noexcept
bool isCleanXmlString (std::string_view sv) noexcept
 Checks if a string contains only valid XML 1.0 characters.
std::string sanitizeXmlString (std::string_view sv)
 Removes invalid XML 1.0 control characters from a string to prevent file corruption.
void appendEscaped (std::string &out, std::string_view sv)
 Fast XML escape: appends escaped characters to out to avoid intermediate allocations.
uint16_t extractColumnFromCellRef (const char *cellRef) noexcept
 Lightweight function to extract column number from a cell reference string. This is a performance-optimized alternative to creating XLCellReference objects.
char * columnToLetters (uint16_t colNo, char *buffer) noexcept
 Convert column number to column letter string (A, B, ..., Z, AA, AB, ..., XFD) Performance optimization: avoids creating full XLCellReference object.
char * makeCellAddress (uint32_t row, uint16_t col, char *buffer) noexcept
 Generate cell address string directly without creating XLCellReference object. Performance optimization: for use in hot loops where address generation is frequent.
template<class T>
void ignore (const T &)
 Get rid of compiler warnings about unused variables (-Wunused-variable) or unused parameters (-Wunusued-parameter).
std::string XLValueTypeString (XLValueType t)
 Get a string representation of pugi::xml_node_type.
std::string xml_node_type_string (XMLNodeType t)
 Get a string representation of XMLNodeType.
std::string XLContentTypeString (OpenXLSX::XLContentType const &t)
 Get a string representation of OpenXLSX::XLContentType.
std::string XLRelationshipTypeString (OpenXLSX::XLRelationshipType const &t)
 Get a string representation of OpenXLSX::XLRelationshipType.
XMLNode getRowNode (XMLNode sheetDataNode, uint32_t rowNumber, uint32_t *hintRowNumber=nullptr, XMLNode *hintRowNode=nullptr)
std::vector< XLStyleIndex > getColumnStyles (XMLNode rowNode, uint16_t count)
 get the style attribute s for the indicated column, if any is set
XLStyleIndex getColumnStyle (XMLNode rowNode, uint16_t colNo)
void setDefaultCellAttributes (XMLNode cellNode, const std::string &cellRef, XMLNode rowNode, uint16_t colNo, std::vector< XLStyleIndex > const &colStyles={})
 set the cell reference, and a default cell style attribute if and only if row or column style is != XLDefaultCellFormat
void setDefaultCellAttributes (XMLNode cellNode, const char *cellRef, XMLNode rowNode, uint16_t colNo, std::vector< XLStyleIndex > const &colStyles={})
 Overload accepting const char* for cell reference - avoids std::string allocation Performance optimization: for use in hot loops where address generation is frequent.
XMLNode getCellNode (XMLNode rowNode, uint16_t columnNumber, uint32_t rowNumber=0, std::vector< XLStyleIndex > const &colStyles={}, uint16_t *hintColNumber=nullptr, XMLNode *hintCellNode=nullptr)
 Retrieve the xml node representing the cell at the given row and column. If the node doesn't exist, it will be created.
std::pair< uint32_t, uint32_t > getImageDimensions (const std::string &data)
 Extract image dimensions (width and height) from raw image data (PNG/JPEG).
int findStringInVector (std::string_view nodeName, std::vector< std::string_view > const &nodeOrder)
 Index of nodeName in nodeOrder, or SORT_INDEX_NOT_FOUND.
void copyLeadingWhitespaces (XMLNode &parent, XMLNode fromNode, XMLNode toNode)
 Copy leading pcdata (whitespace) siblings from fromNode before toNode.
XMLNode ensureChild (XMLNode &parent, const char *nodeName, std::vector< std::string_view > const &nodeOrder={}, bool force_ns=false)
 Ensure a child element named nodeName exists under parent and return it.
XMLNode ensureChild (XMLNode &parent, std::string const &nodeName, std::vector< std::string_view > const &nodeOrder={}, bool force_ns=false)
XMLNode ensureChildPath (XMLNode &parent, std::initializer_list< const char * > path)
 Ensure a chain of simple (unordered) child elements exists.
XMLAttribute ensureAttr (XMLNode &node, const char *attrName, const char *defaultVal="")
 Ensure attribute exists; write defaultVal only when creating.
XMLAttribute ensureAttr (XMLNode &node, std::string const &attrName, std::string const &defaultVal)
XMLAttribute setAttr (XMLNode &node, const char *attrName, const char *attrVal)
 Ensure attribute exists and always set its value (string).
XMLAttribute setAttr (XMLNode &node, const char *attrName, std::string_view attrVal)
XMLAttribute setAttr (XMLNode &node, const char *attrName, std::string const &attrVal)
XMLAttribute setAttr (XMLNode &node, std::string const &attrName, std::string const &attrVal)
template<typename T, typename = std::enable_if_t<std::is_arithmetic_v<T>>>
XMLAttribute setAttr (XMLNode &node, const char *attrName, T attrVal)
 Ensure attribute exists and set a numeric / bool value via XMLAttribute::set_value overloads.
XMLAttribute setAttrBool01 (XMLNode &node, const char *attrName, bool value)
 Excel-style boolean attribute as "1" / "0".
XMLAttribute setAttrBoolTF (XMLNode &node, const char *attrName, bool value)
 Boolean attribute as "true" / "false".
XMLAttribute ensureChildAttr (XMLNode &parent, const char *nodeName, const char *attrName, const char *attrDefaultVal, std::vector< std::string_view > const &nodeOrder={})
 Ensure child nodeName exists and return its attribute attrName (create with default).
XMLAttribute ensureChildAttr (XMLNode &parent, std::string const &nodeName, std::string const &attrName, std::string const &attrDefaultVal, std::vector< std::string_view > const &nodeOrder={})
XMLAttribute setChildAttr (XMLNode &parent, const char *nodeName, const char *attrName, const char *attrVal, bool removeAttributes=XLKeepAttributes, std::vector< std::string_view > const &nodeOrder={})
 Ensure child exists, optionally clear its attributes, then set attrName.
XMLAttribute setChildAttr (XMLNode &parent, std::string const &nodeName, std::string const &attrName, std::string const &attrVal, bool removeAttributes=XLKeepAttributes, std::vector< std::string_view > const &nodeOrder={})
XMLAttribute setVal (XMLNode &node, const char *value)
 Set the @val attribute on node.
XMLAttribute setVal (XMLNode &node, std::string_view value)
XMLAttribute setChildVal (XMLNode &parent, const char *childName, const char *value, std::vector< std::string_view > const &nodeOrder={})
 Ensure child childName exists under parent and set its @val attribute.
XMLAttribute setChildVal (XMLNode &parent, const char *childName, std::string_view value, std::vector< std::string_view > const &nodeOrder={})
XMLNode setChildText (XMLNode &parent, const char *childName, std::string_view text, std::vector< std::string_view > const &nodeOrder={})
 Ensure child exists (optional order) and set its text content.
bool getBoolAttributeWhenOmittedMeansTrue (XMLNode &parent, const char *tagName, const char *attrName="val")
 Bool tag with omitted @val meaning true (legacy OOXML quirk).
bool getBoolAttributeWhenOmittedMeansTrue (XMLNode &parent, std::string const &tagName, std::string const &attrName="val")
XMLNode appendAndGetNode (XMLNode &parent, std::string const &nodeName, std::vector< std::string_view > const &nodeOrder={}, bool force_ns=false)
XMLAttribute appendAndGetAttribute (XMLNode &node, std::string const &attrName, std::string const &attrDefaultVal)
XMLAttribute appendAndSetAttribute (XMLNode &node, std::string const &attrName, std::string const &attrVal)
XMLAttribute appendAndGetNodeAttribute (XMLNode &parent, std::string const &nodeName, std::string const &attrName, std::string const &attrDefaultVal, std::vector< std::string_view > const &nodeOrder={})
XMLAttribute appendAndSetNodeAttribute (XMLNode &parent, std::string const &nodeName, std::string const &attrName, std::string const &attrVal, bool removeAttributes=XLKeepAttributes, std::vector< std::string_view > const &nodeOrder={})
bool enable_xml_namespaces ()
bool disable_xml_namespaces ()
std::string_view chartTypeToNodeName (XLChartType type)
XMLNode getOrCreateChartNode (XMLDocument &doc, std::optional< XLChartType > targetChartType, bool useSecondaryAxis)
XMLNode getChartNode (const XMLDocument &doc)
XMLNode getSeriesNode (const XMLDocument &doc, uint32_t seriesIndex)
void reorderAttributes (XMLNode &node)
 Helper function to ensure attributes are in the correct OOXML order. Openpyxl order (which Excel likes): sqref, showDropDown, showInputMessage, showErrorMessage, allowBlank, errorTitle, error, promptTitle, prompt, type, operator, errorStyle.
bool wouldBeDuplicateShapeType (XMLNode const &rootNode, XMLNode const &shapeTypeNode)
XMLNode moveNode (XMLNode &rootNode, XMLNode &node, XMLNode const &insertAfter, bool withWhitespaces=true)
XLShapeTextVAlign XLShapeTextVAlignFromString (std::string_view vAlignString)
std::string XLShapeTextVAlignToString (XLShapeTextVAlign vAlign)
XLShapeTextHAlign XLShapeTextHAlignFromString (std::string_view hAlignString)
std::string XLShapeTextHAlignToString (XLShapeTextHAlign hAlign)
std::mt19937 Rand32 (0)
void copyXMLNode (XMLNode &destination, const XMLNode &source)
void xmlNodeFingerprintImpl (const XMLNode &node, std::string &fp)
 Compute a canonical, deterministic string fingerprint of a pugixml subtree.
std::string xmlNodeFingerprint (const XMLNode &node)
template<typename E, size_t N>
constexpr E EnumFromString (std::string_view str, const EnumStringMap< E >(&mapping)[N], E invalidVal)
template<typename E, size_t N>
constexpr const char * EnumToString (E val, const EnumStringMap< E >(&mapping)[N], const char *invalidStr)
std::string formatDoubleAsString (double val, int decimalPlaces=2)
 Format val as a string with decimalPlaces.
std::string checkAndFormatDoubleAsString (double val, double min, double max, double absTolerance, int decimalPlaces=2)
 Check that a double value is within range, and format it as a string with decimalPlaces.
void setTableAttribute (XMLNode &node, std::string_view name, std::string_view value)
 Helper to set table attributes in the correct physical order.
constexpr char hexDigit (unsigned int value)
 Return a hexadecimal digit as character that is the equivalent of value.
std::vector< std::string > disassemblePath (std::string_view path, bool eliminateDots=true)
double toDouble (const XLCellValue &v)
bool isNumeric (const XLCellValue &v)
bool isEmpty (const XLCellValue &v)
bool isError (const XLCellValue &v)
std::string toString (const XLCellValue &v)
XLCellValue makeError (std::string_view token)
XLCellValue errValue ()
XLCellValue errDiv0 ()
XLCellValue errNA ()
XLCellValue errNum ()
XLCellValue errRef ()
XLCellValue errName ()
XLCellValue errCirc ()
std::string strTrim (std::string s)
bool tryParseNumericString (std::string_view s, double &out)
 Parse a fully-numeric string (optional leading/trailing space) to double.
XLCellValue coerceToNumber (const XLCellValue &v, bool blankAsZero=true)
 Excel-style scalar numeric coercion for math functions and arithmetic.
XLCellValue coerceArgScalar (const XLFormulaArg &arg, bool blankAsZero=true)
 Coerce the first scalar of an argument (implicit intersection / top-left).
XLCellValue firstError (const XLFormulaArg &arg)
 First error value found in argument cells (Excel left-to-right, top-to-bottom).
std::vector< double > numerics (const std::vector< XLFormulaArg > &args)
std::vector< double > numericsOrError (const std::vector< XLFormulaArg > &args, XLCellValue &outError)
 Like numerics(), but if any cell is an Error, sets outError and returns {}.
void setFormulaRandomSeed (uint64_t seed)
 Seed the formula RNG (thread-local engines reseed on next use).
void clearFormulaRandomSeed ()
std::optional< uint64_t > formulaRandomSeed ()
std::mt19937_64 & formulaRng ()

Variables

constexpr const uint32_t XLKeepCellStyle = 1
constexpr const uint32_t XLKeepCellType = 2
constexpr const uint32_t XLKeepCellValue = 4
constexpr const uint32_t XLKeepCellFormula = 8
constexpr const uint16_t XLPriorityNotSet = 0
constexpr const char * XLDefaultCfRulePrefix = "\n\t\t"
constexpr const char * XLDefaultConditionalFormattingPrefix = "\n\t"
constexpr uint16_t MAX_COLS = 16'384
constexpr uint32_t MAX_ROWS = 1'048'576
constexpr uint16_t MAX_SHAPE_ANCHOR_COLUMN = 13067
constexpr uint32_t MAX_SHAPE_ANCHOR_ROW = 852177
constexpr const unsigned int pugi_parse_settings = 0x001e
constexpr const bool XLForceOverwrite = true
constexpr const bool XLDoNotOverwrite = false
const std::string_view ShapeNodeName = "v:shape"
const std::string_view ShapeTypeNodeName = "v:shapetype"
constexpr const XLShapeTextVAlign XLDefaultShapeTextVAlign = XLShapeTextVAlign::Top
constexpr const XLShapeTextHAlign XLDefaultShapeTextHAlign = XLShapeTextHAlign::Left
constexpr bool XLResetValue = true
constexpr bool XLPreserveValue = false
constexpr const XLMergeIndex XLMergeNotFound = -1
constexpr size_t XLMaxMergeCells = (std::numeric_limits<XLMergeIndex>::max)()
std::mt19937 Rand32
 Return a 32 bit random value.
constexpr size_t XLMaxSharedStrings = (std::numeric_limits<int32_t>::max)()
const XLSharedStrings XLSharedStringsDefaulted {}
constexpr const bool XLEmptyHiddenCells = true
constexpr const uint32_t XLInvalidUInt16 = 0xffff
constexpr const uint32_t XLInvalidUInt32 = 0xffffffff
constexpr const uint32_t XLDeleteProperty = XLInvalidUInt32
constexpr const bool XLPermitXfID = true
constexpr const bool XLCreateIfMissing = true
constexpr const bool XLDoNotCreate = false
constexpr const bool XLForceFillType = true
constexpr const char * XLDefaultStylesPrefix = "\n\t"
constexpr const char * XLDefaultStyleEntriesPrefix = "\n\t\t"
constexpr const XLStyleIndex XLDefaultCellFormat = 0
constexpr const XLStyleIndex XLInvalidStyleIndex = XLInvalidUInt32
constexpr const uint32_t XLDefaultFontSize = 12
constexpr const char * XLDefaultFontColor = "ff000000"
constexpr const char * XLDefaultFontColorTheme = ""
constexpr const char * XLDefaultFontName = "Arial"
constexpr const uint32_t XLDefaultFontFamily = 0
constexpr const uint32_t XLDefaultFontCharset = 1
constexpr const char * XLDefaultLineStyle = ""
constexpr const XLFillType XLDefaultFillType = XLPatternFill
constexpr const XLPatternType XLDefaultPatternType = XLPatternNone
constexpr const char * XLDefaultPatternFgColor = "ffffffff"
constexpr const char * XLDefaultPatternBgColor = "ff000000"
const std::vector< std::string_view > XLWorksheetNodeOrder
const std::vector< std::string_view > XLSheetViewNodeOrder
constexpr bool XLRemoveAttributes = true
constexpr bool XLKeepAttributes = false
constexpr int SORT_INDEX_NOT_FOUND = -1
constexpr const bool XLForceNamespace = true
constexpr XMLNodeType node_null = 0
constexpr XMLNodeType node_document = 1
constexpr XMLNodeType node_element = 2
constexpr XMLNodeType node_pcdata = 3
constexpr XMLNodeType node_cdata = 4
constexpr XMLNodeType node_comment = 5
constexpr XMLNodeType node_declaration = 6
constexpr XMLNodeType node_doctype = 7
constexpr XMLNodeType node_pi = 8
constexpr XMLParseStatus status_ok = 0
constexpr XMLParseStatus status_file_not_found = 1
constexpr XMLParseStatus status_io_error = 2
constexpr XMLParseStatus status_out_of_memory = 3
constexpr XMLParseStatus status_internal_error = 4
constexpr XMLParseStatus status_unrecognized_tag = 5
constexpr XMLParseStatus status_bad_pi = 6
constexpr XMLParseStatus status_bad_comment = 7
constexpr XMLParseStatus status_bad_cdata = 8
constexpr XMLParseStatus status_bad_doctype = 9
constexpr XMLParseStatus status_bad_pcdata = 10
constexpr XMLParseStatus status_bad_start_element = 11
constexpr XMLParseStatus status_bad_attribute = 12
constexpr XMLParseStatus status_bad_end_element = 13
constexpr XMLParseStatus status_end_element_mismatch = 14
constexpr XMLParseStatus status_append_invalid_root = 15
constexpr XMLParseStatus status_no_document_element = 16
constexpr const char * XLXmlDefaultVersion = "1.0"
constexpr const char * XLXmlDefaultEncoding = "UTF-8"
constexpr const bool XLXmlStandalone = true
constexpr const bool XLXmlNotStandalone = false
constexpr uint32_t EMU_PER_PIXEL = 9525
constexpr uint32_t DEFAULT_IMAGE_SIZE = 100
const std::vector< std::string_view > ColumnNodeOrder = {"calculatedColumnFormula", "totalsRowFormula", "xmlColumnPr", "extLst"}
const std::vector< std::string_view > TableNodeOrder = {"autoFilter", "sortState", "tableColumns", "tableStyleInfo", "extLst"}
 The TableNodeOrder vector defines the order of nodes in the table XML file.
const std::vector< std::string_view > TableAttributeOrder
 The TableAttributeOrder defines the mandatory physical sequence of attributes in the.

Typedef Documentation

◆ FlatHashMap

template<typename Key, typename Value>
using OpenXLSX::FlatHashMap = ankerl::unordered_dense::map<Key, Value, StringViewHash, std::equal_to<>>

◆ XLCellResolver

using OpenXLSX::XLCellResolver = std::function<XLCellValue(std::string_view ref)>

Callback type: resolves a cell reference string to a cell value.

The string is the raw reference text, e.g. "A1", "$B$2", "Sheet1!C3", or "A1:B10" for a range (the engine calls this once per distinct ref). Return XLCellValue{} (empty) for unknown or out-of-range cells.

Range refs are passed as-is. The engine detects the colon in the text and will call the resolver with each individual cell in the range when it needs to expand the range. The resolver only needs to handle single-cell refs; range expansion is done internally.

◆ XLDiffCellFormat

Backward compatibility alias.

◆ XLDiffCellFormats

Backward compatibility alias.

◆ XLMergeIndex

typedef int32_t OpenXLSX::XLMergeIndex

◆ XLNameResolver

using OpenXLSX::XLNameResolver = std::function<std::optional<std::string>(std::string_view name)>

Optional callback: resolve a defined name to a formula/reference string.

Return e.g. "Sheet1!$A$1:$B$10" or "=$A$1". Empty optional = unknown name.

◆ XLSharedStringsRef

typedef std::reference_wrapper<const XLSharedStrings> OpenXLSX::XLSharedStringsRef

◆ XLSpillOccupancy

using OpenXLSX::XLSpillOccupancy = std::function<bool(uint32_t row, uint16_t col)>

Callback: return true if (row,col) is occupied and must not be overwritten by a spill (except the formula anchor cell itself).

◆ XLSpillWriter

using OpenXLSX::XLSpillWriter = std::function<void(uint32_t row, uint16_t col, const XLCellValue& value)>

Callback used by spillArray to write one spill cell (1-based Excel coordinates).

◆ XLStyleIndex

using OpenXLSX::XLStyleIndex = size_t

◆ XLTables

◆ XMLDocument

◆ XMLNode

◆ XMLNodeType

using OpenXLSX::XMLNodeType = int

◆ XMLParseStatus

Enumeration Type Documentation

◆ XLAlignmentStyle

Enumerator
XLAlignGeneral 
XLAlignLeft 
XLAlignRight 
XLAlignCenter 
XLAlignTop 
XLAlignBottom 
XLAlignFill 
XLAlignJustify 
XLAlignCenterContinuous 
XLAlignDistributed 
XLAlignInvalid 

◆ XLAxisCrosses

enum class OpenXLSX::XLAxisCrosses
strong
Enumerator
AutoZero 
Min 
Max 

◆ XLAxisOrientation

enum class OpenXLSX::XLAxisOrientation
strong
Enumerator
MinMax 
MaxMin 

◆ XLAxisTickLabelPosition

Enumerator
NextToAxis 
High 
Low 
None 

◆ XLCalcStatus

enum class OpenXLSX::XLCalcStatus : uint8_t
strong

Result status for a single calcCellValue / recalculate step.

Enumerator
Ok 
Circular 
Error 
Empty 

◆ XLCfOperator

enum class OpenXLSX::XLCfOperator : uint8_t
strong
Enumerator
LessThan 
LessThanOrEqual 
Equal 
NotEqual 
GreaterThanOrEqual 
GreaterThan 
Between 
NotBetween 
ContainsText 
NotContains 
BeginsWith 
EndsWith 
Invalid 

◆ XLCfTimePeriod

enum class OpenXLSX::XLCfTimePeriod : uint8_t
strong
Enumerator
Today 
Yesterday 
Tomorrow 
Last7Days 
ThisMonth 
LastMonth 
NextMonth 
ThisWeek 
LastWeek 
NextWeek 
Invalid 

◆ XLCfType

enum class OpenXLSX::XLCfType : uint8_t
strong
Enumerator
Expression 
CellIs 
ColorScale 
DataBar 
IconSet 
Top10 
UniqueValues 
DuplicateValues 
ContainsText 
NotContainsText 
BeginsWith 
EndsWith 
ContainsBlanks 
NotContainsBlanks 
ContainsErrors 
NotContainsErrors 
TimePeriod 
AboveAverage 
Invalid 

◆ XLCfvoType

enum class OpenXLSX::XLCfvoType : uint8_t
strong
Enumerator
Min 
Max 
Number 
Percent 
Formula 
Percentile 
Invalid 

◆ XLChartType

enum class OpenXLSX::XLChartType
strong
Enumerator
Bar 
BarStacked 
BarPercentStacked 
Bar3D 
Bar3DStacked 
Bar3DPercentStacked 
Column 
ColumnStacked 
ColumnPercentStacked 
Column3D 
Column3DStacked 
Column3DPercentStacked 
Line 
LineStacked 
LinePercentStacked 
Line3D 
Pie 
Pie3D 
Scatter 
ScatterLine 

Scatter with straight lines, no markers.

ScatterLineMarker 

Scatter with straight lines and markers.

ScatterSmooth 

Scatter with smooth lines, no markers.

ScatterSmoothMarker 

Scatter with smooth lines and markers.

ScatterMarker 

Scatter with markers only, no lines.

Bubble 

Bubble chart (needs addBubbleSeries).

StockHLC 
StockOHLC 
Surface 
Surface3D 
SurfaceWireframe 
Surface3DWireframe 
Area 
AreaStacked 
AreaPercentStacked 
Area3D 
Area3DStacked 
Area3DPercentStacked 
Doughnut 
Radar 
RadarFilled 
RadarMarkers 
PieOfPie 
BarOfPie 

◆ XLCommandType

enum class OpenXLSX::XLCommandType : uint8_t
strong
Enumerator
SetSheetName 
SetSheetVisibility 
SetSheetIndex 
SetSheetActive 
ResetCalcChain 
SetFullCalcOnLoad 
CheckAndFixCoreProperties 
CheckAndFixExtendedProperties 
CheckAndFixCustomProperties 
AddSharedStrings 
AddWorksheet 
AddChartsheet 
DeleteSheet 
CloneSheet 
AddStyles 

◆ XLContentType

enum class OpenXLSX::XLContentType : uint8_t
strong
Enumerator
Workbook 
Relationships 
WorkbookMacroEnabled 
Worksheet 
Chartsheet 
ExternalLink 
Theme 
Styles 
SharedStrings 
Drawing 
Chart 
ChartStyle 
ChartColorStyle 
ControlProperties 
CalculationChain 
VBAProject 
CoreProperties 
ExtendedProperties 
CustomProperties 
Comments 
Table 
VMLDrawing 
Hyperlink 
Unknown 
PivotTable 
Slicer 
SlicerCache 
PivotCacheDefinition 
PivotCacheRecords 
ThreadedComments 
Persons 

◆ XLDataBarAxisPosition

enum class OpenXLSX::XLDataBarAxisPosition : uint8_t
strong
Enumerator
Automatic 
Middle 
None 

◆ XLDataBarDirection

enum class OpenXLSX::XLDataBarDirection : uint8_t
strong
Enumerator
Context 
LeftToRight 
RightToLeft 

◆ XLDataValidationErrorStyle

Enumerator
Stop 
Warning 
Information 

◆ XLDataValidationOperator

Enumerator
Between 
Equal 
GreaterThan 
GreaterThanOrEqual 
LessThan 
LessThanOrEqual 
NotBetween 
NotEqual 

◆ XLDataValidationType

enum class OpenXLSX::XLDataValidationType
strong
Enumerator
None 
Custom 
Date 
Decimal 
List 
TextLength 
Time 
Whole 

◆ XLDynamicFilterType

enum class OpenXLSX::XLDynamicFilterType
strong

Enum defining all valid dynamic filter types according to ECMA-376 18.18.25.

Enumerator
Null 
AboveAverage 
BelowAverage 
Tomorrow 
Today 
Yesterday 
NextWeek 
ThisWeek 
LastWeek 
NextMonth 
ThisMonth 
LastMonth 
NextQuarter 
ThisQuarter 
LastQuarter 
NextYear 
ThisYear 
LastYear 
YearToDate 
Q1 
Q2 
Q3 
Q4 
M1 
M2 
M3 
M4 
M5 
M6 
M7 
M8 
M9 
M10 
M11 
M12 

◆ XLErrorBarDirection

enum class OpenXLSX::XLErrorBarDirection
strong
Enumerator
X 
Y 

◆ XLErrorBarType

enum class OpenXLSX::XLErrorBarType
strong
Enumerator
Both 
Minus 
Plus 

◆ XLErrorBarValueType

enum class OpenXLSX::XLErrorBarValueType
strong
Enumerator
Custom 
FixedValue 
Percentage 
StandardDeviation 
StandardError 

◆ XLFillType

enum OpenXLSX::XLFillType : uint8_t
Enumerator
XLGradientFill 
XLPatternFill 
XLFillTypeInvalid 

◆ XLFilterLogic

enum class OpenXLSX::XLFilterLogic
strong

Enum class defining the logical operator for custom filters.

Enumerator
And 
Or 

◆ XLFontSchemeStyle

Enumerator
XLFontSchemeNone 
XLFontSchemeMajor 
XLFontSchemeMinor 
XLFontSchemeInvalid 

◆ XLFormatTokenType

enum class OpenXLSX::XLFormatTokenType
strong
Enumerator
Literal 
Year 
Month 
Day 
Hour 
Minute 
Second 
AMPM 
DigitZero 
DigitOpt 
Decimal 
Thousands 
Percent 
TextPlaceholder 

◆ XLGradientType

enum OpenXLSX::XLGradientType : uint8_t
Enumerator
XLGradientLinear 
XLGradientPath 
XLGradientTypeInvalid 

◆ XLImagePositioning

enum class OpenXLSX::XLImagePositioning
strong

Determines how an image behaves when cells are resized or inserted/deleted.

Enumerator
OneCell 

Image moves with the top-left cell but does not resize.

TwoCell 

Image stretches and moves with both top-left and bottom-right cells.

Absolute 

Image stays exactly at a fixed absolute coordinate on the sheet.

◆ XLIMEMode

enum class OpenXLSX::XLIMEMode
strong

IME (Input Method Editor) mode for data validation.

Enumerator
NoControl 
Off 
On 
Disabled 
Hiragana 
FullKatakana 
HalfKatakana 
FullAlpha 
HalfAlpha 
FullHangul 
HalfHangul 

◆ XLIteratorDirection

enum class OpenXLSX::XLIteratorDirection
strong
Enumerator
Forward 
Reverse 

◆ XLIteratorLocation

enum class OpenXLSX::XLIteratorLocation
strong
Enumerator
Begin 
End 

◆ XLLegendPosition

enum class OpenXLSX::XLLegendPosition
strong
Enumerator
Bottom 
Left 
Right 
Top 
TopRight 
Hidden 

◆ XLLineDashType

enum class OpenXLSX::XLLineDashType
strong
Enumerator
Unset 
Solid 
Dot 
Dash 
LgDash 
DashDot 
LgDashDot 
LgDashDotDot 
SysDash 
SysDot 
SysDashDot 

◆ XLLineStyle

enum OpenXLSX::XLLineStyle : uint8_t
Enumerator
XLLineStyleNone 
XLLineStyleThin 
XLLineStyleMedium 
XLLineStyleDashed 
XLLineStyleDotted 
XLLineStyleThick 
XLLineStyleDouble 
XLLineStyleHair 
XLLineStyleMediumDashed 
XLLineStyleDashDot 
XLLineStyleMediumDashDot 
XLLineStyleDashDotDot 
XLLineStyleMediumDashDotDot 
XLLineStyleSlantDashDot 
XLLineStyleInvalid 

◆ XLLineType

enum OpenXLSX::XLLineType : uint8_t
Enumerator
XLLineLeft 
XLLineRight 
XLLineTop 
XLLineBottom 
XLLineDiagonal 
XLLineVertical 
XLLineHorizontal 
XLLineInvalid 

◆ XLMarkerStyle

enum class OpenXLSX::XLMarkerStyle
strong
Enumerator
None 
Circle 
Dash 
Diamond 
Dot 
Picture 
Plus 
Square 
Star 
Triangle 
X 
Default 

◆ XLNodeKind

enum class OpenXLSX::XLNodeKind : uint8_t
strong

Kind discriminator for AST nodes.

Enumerator
Number 
StringLit 
BoolLit 
CellRef 

e.g. "A1" or "Sheet1!A1"

Range 

e.g. "A1:B10" – evaluated lazily by the resolver

BinOp 
UnaryOp 
FuncCall 
ArrayLit 

Excel array constant {1,2;3,4} — children row-major; number=rows, text=cols.

ErrorLit 

#NAME?, etc. – propagated as-is

◆ XLPageOrientation

enum class OpenXLSX::XLPageOrientation
strong

Enum defining page orientation.

Enumerator
Default 
Portrait 
Landscape 

◆ XLPane

enum class OpenXLSX::XLPane : uint8_t
strong

The XLPane is an enumeration of the possible pane identifiers.

Enumerator
BottomRight 
TopRight 
BottomLeft 
TopLeft 

◆ XLPaneState

enum class OpenXLSX::XLPaneState : uint8_t
strong

The XLPaneState is an enumeration of the possible states of a pane, e.g. Frozen or Split.

Enumerator
Split 
Frozen 
FrozenSplit 

◆ XLPatternType

enum OpenXLSX::XLPatternType : uint8_t
Enumerator
XLPatternNone 
XLPatternSolid 
XLPatternMediumGray 
XLPatternDarkGray 
XLPatternLightGray 
XLPatternDarkHorizontal 
XLPatternDarkVertical 
XLPatternDarkDown 
XLPatternDarkUp 
XLPatternDarkGrid 
XLPatternDarkTrellis 
XLPatternLightHorizontal 
XLPatternLightVertical 
XLPatternLightDown 
XLPatternLightUp 
XLPatternLightGrid 
XLPatternLightTrellis 
XLPatternGray125 
XLPatternGray0625 
XLPatternTypeInvalid 

◆ XLPivotShowValuesAs

enum class OpenXLSX::XLPivotShowValuesAs : uint8_t
strong

"Show Values As" calculation for pivot data fields (OOXML showDataAs / x14:dataField).

Types marked x14 are written via extLst (Excel 2010+). Classic types use @showDataAs.

Enumerator
Normal 
PercentOfGrandTotal 

percentOfTotal

PercentOfColumnTotal 

percentOfCol

PercentOfRowTotal 

percentOfRow

PercentOf 

percent (needs baseField + baseItem)

PercentOfParentRowTotal 

x14 percentOfParentRow

PercentOfParentColumnTotal 

x14 percentOfParentCol

PercentOfParentTotal 

x14 percentOfParent (needs baseField)

DifferenceFrom 

difference (baseField + baseItem)

PercentDifferenceFrom 

percentDiff (baseField + baseItem)

RunningTotalIn 

runTotal (baseField)

PercentRunningTotalIn 

x14 percentOfRunningTotal (baseField)

RankSmallestToLargest 

x14 rankAscending (baseField)

RankLargestToSmallest 

x14 rankDescending (baseField)

Index 

x14 index

◆ XLPivotSubtotal

enum class OpenXLSX::XLPivotSubtotal
strong
Enumerator
Sum 
Average 
Count 
Max 
Min 
Product 
CountNums 
StdDev 
StdDevP 
Var 
VarP 

◆ XLProperty

enum class OpenXLSX::XLProperty
strong

The XLDocumentProperties class is an enumeration of the possible properties (metadata) that can be set for a XLDocument object (and .xlsx file).

Enumerator
Title 
Subject 
Creator 
Keywords 
Description 
LastModifiedBy 
LastPrinted 
CreationDate 
ModificationDate 
Category 
Application 
DocSecurity 
ScaleCrop 
Manager 
Company 
LinksUpToDate 
SharedDoc 
HyperlinkBase 
HyperlinksChanged 
AppVersion 

◆ XLQueryType

enum class OpenXLSX::XLQueryType : uint8_t
strong
Enumerator
QuerySheetName 
QuerySheetIndex 
QuerySheetVisibility 
QuerySheetIsActive 
QuerySheetType 
QuerySheetID 
QuerySheetRelsID 
QuerySheetRelsTarget 
QuerySharedStrings 
QueryXmlData 

◆ XLReadingOrder

enum OpenXLSX::XLReadingOrder : uint32_t
Enumerator
XLReadingOrderContextual 
XLReadingOrderLeftToRight 
XLReadingOrderRightToLeft 

◆ XLRelationshipType

enum class OpenXLSX::XLRelationshipType
strong

An enum of the possible relationship (or XML document) types used in relationship (.rels) XML files.

Enumerator
CoreProperties 
ExtendedProperties 
CustomProperties 
Workbook 
Worksheet 
Chartsheet 
Dialogsheet 
Macrosheet 
CalculationChain 
ExternalLink 
ExternalLinkPath 
Theme 
Styles 
Chart 
ChartStyle 
ChartColorStyle 
Image 
Drawing 
VMLDrawing 
SharedStrings 
PrinterSettings 
VBAProject 
ControlProperties 
Comments 
Table 
Hyperlink 
Unknown 
PivotTable 
Slicer 
SlicerCache 
PivotCacheDefinition 
PivotCacheRecords 
ThreadedComments 
Person 

◆ XLShapeTextHAlign

enum class OpenXLSX::XLShapeTextHAlign : uint8_t
strong
Enumerator
Left 
Right 
Center 
Invalid 

◆ XLShapeTextVAlign

enum class OpenXLSX::XLShapeTextVAlign : uint8_t
strong
Enumerator
Center 
Top 
Bottom 
Invalid 

◆ XLSheetState

enum class OpenXLSX::XLSheetState : uint8_t
strong

The XLSheetState is an enumeration of the possible (visibility) states, e.g. Visible or Hidden.

Enumerator
Visible 
Hidden 
VeryHidden 

◆ XLSheetType

enum class OpenXLSX::XLSheetType
strong

Enumeration of the different types of sheets.

Enumerator
Worksheet 
Chartsheet 
Dialogsheet 
Macrosheet 

◆ XLSlicerStyle

enum class OpenXLSX::XLSlicerStyle : uint8_t
strong
Enumerator
Light1 
Light2 
Light3 
Light4 
Light5 
Light6 
Dark1 
Dark2 
Dark3 
Dark4 
Dark5 
Dark6 
Other1 
Other2 
Custom 

◆ XLSparklineType

enum class OpenXLSX::XLSparklineType
strong

The XLSparklineType enum represents the type of a sparkline.

Enumerator
Line 
Column 
Stacked 

◆ XLStreamDimensionMode

enum class OpenXLSX::XLStreamDimensionMode : uint8_t
strong

How <dimension> is finalized on close without reloading the full sheet XML.

FixedSlot writes a constant-width placeholder (max Excel range) and patches it in-place via seek/overwrite — O(1) memory. Omit leaves the max-range placeholder.

Enumerator
FixedSlot 
OmitPatch 

◆ XLStreamEmptyRowPolicy

enum class OpenXLSX::XLStreamEmptyRowPolicy : uint8_t
strong

Policy for logical row gaps (missing <row> elements in sheetData).

Enumerator
SkipMissingRows 

Only return rows that exist in the XML (legacy default).

Matches prior OpenXLSX behaviour: if sheet jumps from row 1 to row 3, the second nextRow() yields row 3.

EmitEmptyRows 

Synthesize empty rows for gaps in row numbers (excelize GetRows-like).

After row 1, nextRow() yields an empty row 2 before row 3.

◆ XLStreamFormulaType

enum class OpenXLSX::XLStreamFormulaType : uint8_t
strong

Formula type attributes for shared / array formulas (OOXML <f t=…>).

Enumerator
Normal 
Array 
Shared 
DataTable 

◆ XLStreamOpenMode

enum class OpenXLSX::XLStreamOpenMode : uint8_t
strong

How streamWriter materializes the worksheet header.

Auto uses Fresh when the sheet has no rows (cheap skeleton), else Hybrid (serialize current DOM and append inside sheetData).

Enumerator
Auto 
Fresh 
Hybrid 

◆ XLStreamSharedStringMode

enum class OpenXLSX::XLStreamSharedStringMode : uint8_t
strong

How shared-string cells (t="s") are resolved during streaming reads.

Enumerator
Eager 

Use the workbook's in-memory shared string table (default, fastest for small SST).

Indexed 

Build a byte-offset index into sharedStrings.xml and resolve strings on demand.

Reduces peak memory when the SST is huge; first access may load the SST part once for indexing.

◆ XLTokenKind

enum class OpenXLSX::XLTokenKind : uint8_t
strong

Kinds of tokens produced by the lexer.

Enumerator
Number 

Numeric literal (integer or float).

String 

Quoted string literal "hello".

Bool 

TRUE or FALSE keyword.

CellRef 

Cell reference A1, $B$2, Sheet1!C3.

Ident 

Function name or named range.

Plus 
Minus 
Star 
Slash 

/

Caret 

^ (power)

Percent 

%

Amp 

& (string concat)

Eq 

=

NEq 

<>

Lt 

<

Le 

<=

Gt 

Ge 

>=

LParen 

(

RParen 

)

Comma 

,

Semicolon 

; (alternative argument separator in some locales)

Colon 

: (used inside range references parsed by lexer)

LBrace 

{ (array constant)

RBrace 

} (array constant)

End 

Sentinel – end of input.

Error 

Unrecognised character.

◆ XLTotalsRowFunction

enum class OpenXLSX::XLTotalsRowFunction
strong

Enum class defining the possible functions for a table's totals row.

Enumerator
None 
Sum 
Min 
Max 
Average 
Count 
CountNums 
StdDev 
Var 
Custom 

◆ XLTrendlineType

enum class OpenXLSX::XLTrendlineType
strong
Enumerator
Linear 
Exponential 
Logarithmic 
Polynomial 
Power 
MovingAverage 

◆ XLUnderlineStyle

Enumerator
XLUnderlineNone 
XLUnderlineSingle 
XLUnderlineDouble 
XLUnderlineSingleAccounting 
XLUnderlineDoubleAccounting 
XLUnderlineInvalid 

◆ XLValueType

enum class OpenXLSX::XLValueType
strong

Enum defining the valid value types for a an Excel spreadsheet cell.

Enumerator
Empty 
Boolean 
Integer 
Float 
Error 
String 
RichText 

◆ XLVectorShapeType

enum class OpenXLSX::XLVectorShapeType
strong

An encapsulation of a drawing item (e.g. an image).

Enumerator
Rectangle 
Ellipse 
Line 
Triangle 
RightTriangle 
Arrow 
Diamond 
Parallelogram 
Hexagon 
Star4 
Star5 
Star16 
Star24 
Heart 
SmileyFace 
Cloud 
Donut 
Ribbon 
Sun 
Moon 
LightningBolt 
FlowChartProcess 
FlowChartDecision 
FlowChartDocument 
FlowChartData 

◆ XLVerticalAlignRunStyle

Enumerator
XLBaseline 
XLSubscript 
XLSuperscript 
XLVerticalAlignRunInvalid 

Function Documentation

◆ appendAndGetAttribute()

XMLAttribute OpenXLSX::appendAndGetAttribute ( XMLNode & node,
std::string const & attrName,
std::string const & attrDefaultVal )
inline

◆ appendAndGetNode()

XMLNode OpenXLSX::appendAndGetNode ( XMLNode & parent,
std::string const & nodeName,
std::vector< std::string_view > const & nodeOrder = {},
bool force_ns = false )
inline

◆ appendAndGetNodeAttribute()

XMLAttribute OpenXLSX::appendAndGetNodeAttribute ( XMLNode & parent,
std::string const & nodeName,
std::string const & attrName,
std::string const & attrDefaultVal,
std::vector< std::string_view > const & nodeOrder = {} )
inline

◆ appendAndSetAttribute()

XMLAttribute OpenXLSX::appendAndSetAttribute ( XMLNode & node,
std::string const & attrName,
std::string const & attrVal )
inline

◆ appendAndSetNodeAttribute()

XMLAttribute OpenXLSX::appendAndSetNodeAttribute ( XMLNode & parent,
std::string const & nodeName,
std::string const & attrName,
std::string const & attrVal,
bool removeAttributes = XLKeepAttributes,
std::vector< std::string_view > const & nodeOrder = {} )
inline

◆ appendEscaped()

void OpenXLSX::appendEscaped ( std::string & out,
std::string_view sv )
inline

Fast XML escape: appends escaped characters to out to avoid intermediate allocations.

Parameters
outThe destination string to append to
svThe string view to escape and append

◆ BinaryAsHexString()

std::string OpenXLSX::BinaryAsHexString ( gsl::span< const std::byte > data)
nodiscard

Converts raw byte arrays into hex-encoded strings, required for constructing valid OOXML password hashes.

◆ chartTypeToNodeName()

std::string_view OpenXLSX::chartTypeToNodeName ( XLChartType type)
nodiscard

Map XLChartType enum to OOXML chart element name (e.g. "c:barChart").

◆ checkAndFormatDoubleAsString()

std::string OpenXLSX::checkAndFormatDoubleAsString ( double val,
double min,
double max,
double absTolerance,
int decimalPlaces = 2 )
inline

Check that a double value is within range, and format it as a string with decimalPlaces.

◆ clearFormulaRandomSeed()

Clear the optional seed (next RNG construction uses random_device).

◆ coerceArgScalar()

XLCellValue OpenXLSX::formula::coerceArgScalar ( const XLFormulaArg & arg,
bool blankAsZero = true )
nodiscard

Coerce the first scalar of an argument (implicit intersection / top-left).

Returns
Error if the arg is missing/empty (no cells), or coerceToNumber of asScalar().

◆ coerceToNumber()

XLCellValue OpenXLSX::formula::coerceToNumber ( const XLCellValue & v,
bool blankAsZero = true )
nodiscard

Excel-style scalar numeric coercion for math functions and arithmetic.

Error → same error (propagated). Empty → 0 when blankAsZero, else #VALUE!. Integer/Float/Boolean → numeric. Fully-numeric string → number. Else #VALUE!.

Returns
A Float/Integer cell value, or an Error cell value.

◆ columnToLetters()

char * OpenXLSX::columnToLetters ( uint16_t colNo,
char * buffer )
inlinenoexcept

Convert column number to column letter string (A, B, ..., Z, AA, AB, ..., XFD) Performance optimization: avoids creating full XLCellReference object.

Parameters
colNoColumn number (1-indexed)
bufferOutput buffer (must be at least 4 bytes for "XFD" + null)
Returns
Pointer to the buffer

◆ copyLeadingWhitespaces()

void OpenXLSX::copyLeadingWhitespaces ( XMLNode & parent,
XMLNode fromNode,
XMLNode toNode )
inline

Copy leading pcdata (whitespace) siblings from fromNode before toNode.

◆ copyXMLNode()

void OpenXLSX::copyXMLNode ( XMLNode & destination,
const XMLNode & source )
inline

◆ decryptDocument()

std::vector< uint8_t > OpenXLSX::decryptDocument ( gsl::span< const uint8_t > data,
const std::string & password )

High-level API to decrypt an entire document from a buffer.

Parameters
dataThe CFB file data.
passwordThe user password.
Returns
The decrypted ZIP package.

◆ disable_xml_namespaces()

bool OpenXLSX::disable_xml_namespaces ( )

◆ disassemblePath()

std::vector< std::string > OpenXLSX::disassemblePath ( std::string_view path,
bool eliminateDots = true )

Split a path into its constituent entries (directories and file). Rationale: Standard path decomposition used for relative path calculation. Uses std::string_view for zero-copy parsing.

◆ eliminateDotAndDotDotFromPath()

std::string OpenXLSX::eliminateDotAndDotDotFromPath ( std::string_view path)
nodiscard

Standardize path by resolving '.' and '..' segments. Rationale: Normalizes paths to ensure consistent internal ZIP archive lookups.

◆ enable_xml_namespaces()

bool OpenXLSX::enable_xml_namespaces ( )

◆ encryptDocument()

std::vector< uint8_t > OpenXLSX::encryptDocument ( gsl::span< const uint8_t > zipData,
const std::string & password )

High-level API to encrypt a ZIP package into a CFB container.

Parameters
zipDataThe raw ZIP data.
passwordThe user password.
Returns
The encrypted CFB OLE container.

◆ ensureAttr() [1/2]

XMLAttribute OpenXLSX::ensureAttr ( XMLNode & node,
const char * attrName,
const char * defaultVal = "" )
inline

Ensure attribute exists; write defaultVal only when creating.

◆ ensureAttr() [2/2]

XMLAttribute OpenXLSX::ensureAttr ( XMLNode & node,
std::string const & attrName,
std::string const & defaultVal )
inline

◆ ensureChild() [1/2]

XMLNode OpenXLSX::ensureChild ( XMLNode & parent,
const char * nodeName,
std::vector< std::string_view > const & nodeOrder = {},
bool force_ns = false )
inline

Ensure a child element named nodeName exists under parent and return it.

Parameters
nodeOrderOptional MS Office–required element sequence for ordered insert.
force_nsForwarded to XMLNode insert/append (namespace forcing).

◆ ensureChild() [2/2]

XMLNode OpenXLSX::ensureChild ( XMLNode & parent,
std::string const & nodeName,
std::vector< std::string_view > const & nodeOrder = {},
bool force_ns = false )
inline

◆ ensureChildAttr() [1/2]

XMLAttribute OpenXLSX::ensureChildAttr ( XMLNode & parent,
const char * nodeName,
const char * attrName,
const char * attrDefaultVal,
std::vector< std::string_view > const & nodeOrder = {} )
inline

Ensure child nodeName exists and return its attribute attrName (create with default).

◆ ensureChildAttr() [2/2]

XMLAttribute OpenXLSX::ensureChildAttr ( XMLNode & parent,
std::string const & nodeName,
std::string const & attrName,
std::string const & attrDefaultVal,
std::vector< std::string_view > const & nodeOrder = {} )
inline

◆ ensureChildPath()

XMLNode OpenXLSX::ensureChildPath ( XMLNode & parent,
std::initializer_list< const char * > path )
inline

Ensure a chain of simple (unordered) child elements exists.

Note
Does not apply nodeOrder; use ensureChild per level when order matters.

◆ EnumFromString()

template<typename E, size_t N>
E OpenXLSX::EnumFromString ( std::string_view str,
const EnumStringMap< E >(&) mapping[N],
E invalidVal )
constexpr

◆ EnumToString()

template<typename E, size_t N>
const char * OpenXLSX::EnumToString ( E val,
const EnumStringMap< E >(&) mapping[N],
const char * invalidStr )
constexpr

◆ errCirc()

◆ errDiv0()

◆ errNA()

◆ errName()

◆ errNum()

◆ errRef()

◆ errValue()

◆ ExcelPasswordHash()

uint16_t OpenXLSX::ExcelPasswordHash ( std::string_view password)
nodiscard

Implements the legacy Excel hash algorithm to verify or secure sheet protection features.

◆ ExcelPasswordHashAsString()

std::string OpenXLSX::ExcelPasswordHashAsString ( std::string_view password)
nodiscard

Bridges the legacy integer hash to the required XML string format, simplifying integration with the DOM attributes.

◆ extractColumnFromCellRef()

uint16_t OpenXLSX::extractColumnFromCellRef ( const char * cellRef)
inlinenoexcept

Lightweight function to extract column number from a cell reference string. This is a performance-optimized alternative to creating XLCellReference objects.

Parameters
cellRefThe cell reference string (e.g., "A1", "BC42", "XFD1048576")
Returns
The column number (1-based), or 0 if the string is empty or invalid
Note
This function only parses the column part (letters) and ignores the row part. It assumes the input is a valid cell reference with uppercase letters.

◆ findCellNode()

XMLNode OpenXLSX::findCellNode ( XMLNode rowNode,
uint16_t columnNumber )

locate the XML cell node within rownode for the cell at columnNumber

Returns
the XMLNode pointing to the cell, or an empty XMLNode if the cell does not exist

◆ findRowNode()

XMLNode OpenXLSX::findRowNode ( XMLNode sheetDataNode,
uint32_t rowNumber )

locate the XML row node within sheetDataNode for the row at rowNumber

Returns
the XMLNode pointing to the row, or an empty XMLNode if the row does not exist

◆ findStringInVector()

int OpenXLSX::findStringInVector ( std::string_view nodeName,
std::vector< std::string_view > const & nodeOrder )
inline

Index of nodeName in nodeOrder, or SORT_INDEX_NOT_FOUND.

◆ firstError()

First error value found in argument cells (Excel left-to-right, top-to-bottom).

Returns
Error value if any, otherwise Empty.

◆ formatDoubleAsString()

std::string OpenXLSX::formatDoubleAsString ( double val,
int decimalPlaces = 2 )
inline

Format val as a string with decimalPlaces.

◆ formulaRandomSeed()

std::optional< uint64_t > OpenXLSX::formula::formulaRandomSeed ( )
nodiscard

Currently configured seed, if any.

◆ formulaRng()

std::mt19937_64 & OpenXLSX::formula::formulaRng ( )
nodiscard

Thread-local mt19937_64 used by formula random functions.

◆ getBoolAttributeWhenOmittedMeansTrue() [1/2]

bool OpenXLSX::getBoolAttributeWhenOmittedMeansTrue ( XMLNode & parent,
const char * tagName,
const char * attrName = "val" )
inline

Bool tag with omitted @val meaning true (legacy OOXML quirk).

Note
Creates and sets attr to "true" when omitted (preserves historical behavior).

◆ getBoolAttributeWhenOmittedMeansTrue() [2/2]

bool OpenXLSX::getBoolAttributeWhenOmittedMeansTrue ( XMLNode & parent,
std::string const & tagName,
std::string const & attrName = "val" )
inline

◆ getCellNode()

XMLNode OpenXLSX::getCellNode ( XMLNode rowNode,
uint16_t columnNumber,
uint32_t rowNumber = 0,
std::vector< XLStyleIndex > const & colStyles = {},
uint16_t * hintColNumber = nullptr,
XMLNode * hintCellNode = nullptr )
inline

Retrieve the xml node representing the cell at the given row and column. If the node doesn't exist, it will be created.

Parameters
rowNodeThe row node under which to find the cell.
columnNumberThe column at which to find the cell.
rowNumber(optional) row number of the row node, if already known, defaults to 0
colStylesan optional std::vector<XLStyleIndex> that contains all pre-evaluated column styles, and can be used to avoid performance impact from lookup
Returns
The xml node representing the requested cell.

◆ getChartNode()

XMLNode OpenXLSX::getChartNode ( const XMLDocument & doc)
nodiscard

First *Chart child under plotArea (primary chart node).

◆ getColumnStyle()

XLStyleIndex OpenXLSX::getColumnStyle ( XMLNode rowNode,
uint16_t colNo )
inline

◆ getColumnStyles()

std::vector< XLStyleIndex > OpenXLSX::getColumnStyles ( XMLNode rowNode,
uint16_t count )
inline

get the style attribute s for the indicated column, if any is set

Parameters
rowNodethe row node from which to obtain the parent that should hold the <cols> node
colNothe column for which to obtain the style
Returns
the XLStyleIndex stored for the column, or XLDefaultCellFormat if none

Pre-compute all column styles for a row up to a given column count to avoid O(N) DOM lookups

Parameters
rowNodethe row node
countthe maximum column number to fetch styles for
Returns
a vector where index 0 is column 1's style, index 1 is column 2's style, etc.

◆ getImageDimensions()

std::pair< uint32_t, uint32_t > OpenXLSX::getImageDimensions ( const std::string & data)
inline

Extract image dimensions (width and height) from raw image data (PNG/JPEG).

Parameters
dataRaw binary image data
Returns
A pair containing {width, height} in pixels. Returns {0, 0} if parsing fails.

◆ getOrCreateChartNode()

XMLNode OpenXLSX::getOrCreateChartNode ( XMLDocument & doc,
std::optional< XLChartType > targetChartType,
bool useSecondaryAxis )
nodiscard

Locate or create the chart-type child under plotArea for series placement. Creates secondary axes when useSecondaryAxis is true.

◆ getPathARelativeToPathB()

std::string OpenXLSX::getPathARelativeToPathB ( std::string_view pathA,
std::string_view pathB )
nodiscard

Calculate the relative path from B to A. Rationale: Resolves internal OOXML relationship paths, which are often stored relative to the source part's directory.

◆ getRowNode()

XMLNode OpenXLSX::getRowNode ( XMLNode sheetDataNode,
uint32_t rowNumber,
uint32_t * hintRowNumber = nullptr,
XMLNode * hintRowNode = nullptr )
inline

◆ getSeriesNode()

XMLNode OpenXLSX::getSeriesNode ( const XMLDocument & doc,
uint32_t seriesIndex )
nodiscard

Series node at zero-based index under the primary chart node.

◆ hexDigit()

char OpenXLSX::hexDigit ( unsigned int value)
nodiscardconstexpr

Return a hexadecimal digit as character that is the equivalent of value.

◆ ignore()

template<class T>
void OpenXLSX::ignore ( const T & )

Get rid of compiler warnings about unused variables (-Wunused-variable) or unused parameters (-Wunusued-parameter).

Parameters
(unnamed)the variable / parameter which is intentionally unused (e.g. for function stubs)

◆ InitRandom()

void OpenXLSX::InitRandom ( bool pseudoRandom = false)

Initialize XLRand32 data source.

Parameters
pseudoRandomIf true, sequence will be reproducible with a constant seed

Initialize the module's random functions

◆ isCleanXmlString()

bool OpenXLSX::isCleanXmlString ( std::string_view sv)
inlinenoexcept

Checks if a string contains only valid XML 1.0 characters.

Parameters
svThe string view to check
Returns
true if string is clean, false if it contains invalid control characters

◆ isEmpty()

bool OpenXLSX::formula::isEmpty ( const XLCellValue & v)
nodiscard

◆ isEncryptedDocument()

bool OpenXLSX::isEncryptedDocument ( gsl::span< const uint8_t > data)

Checks if a given byte stream represents an OLE CFB document.

Parameters
dataThe file data.
Returns
true if it is an encrypted/OLE document.

◆ isError()

bool OpenXLSX::formula::isError ( const XLCellValue & v)
nodiscard

◆ isNumeric()

bool OpenXLSX::formula::isNumeric ( const XLCellValue & v)
nodiscard

◆ makeCellAddress()

char * OpenXLSX::makeCellAddress ( uint32_t row,
uint16_t col,
char * buffer )
inlinenoexcept

Generate cell address string directly without creating XLCellReference object. Performance optimization: for use in hot loops where address generation is frequent.

Parameters
rowRow number (1-indexed)
colColumn number (1-indexed)
bufferOutput buffer (must be at least 16 bytes)
Returns
Pointer to the buffer

◆ makeError()

XLCellValue OpenXLSX::formula::makeError ( std::string_view token)
nodiscard

Build an error XLCellValue with the given Excel error token (e.g. "#VALUE!").

◆ moveNode()

XMLNode OpenXLSX::moveNode ( XMLNode & rootNode,
XMLNode & node,
XMLNode const & insertAfter,
bool withWhitespaces = true )

◆ numerics()

std::vector< double > OpenXLSX::formula::numerics ( const std::vector< XLFormulaArg > & args)
nodiscard

Flatten numeric values from formula arguments (skips non-numeric cells and errors).

◆ numericsOrError()

std::vector< double > OpenXLSX::formula::numericsOrError ( const std::vector< XLFormulaArg > & args,
XLCellValue & outError )
nodiscard

Like numerics(), but if any cell is an Error, sets outError and returns {}.

Used by SUM/AVERAGE/MIN/MAX so errors short-circuit instead of being skipped.

◆ operator!=() [1/14]

bool OpenXLSX::operator!= ( const XLCell & lhs,
const XLCell & rhs )
inline
Parameters
lhs
rhs
Returns

◆ operator!=() [2/14]

bool OpenXLSX::operator!= ( const XLCellReference & lhs,
const XLCellReference & rhs )
inlinenoexcept

Detects coordinate divergence, effectively identical to !(lhs == rhs).

◆ operator!=() [3/14]

bool OpenXLSX::operator!= ( const XLCellValue & lhs,
const XLCellValue & rhs )
inline
Parameters
lhs
rhs

◆ operator!=() [4/14]

bool OpenXLSX::operator!= ( const XLColor & lhs,
const XLColor & rhs )
inline

Checks if two colors differ in any of their ARGB channels.

◆ operator!=() [5/14]

bool OpenXLSX::operator!= ( const XLFormula & lhs,
const XLFormula & rhs )
inline
Parameters
lhs
rhs
Returns

◆ operator!=() [6/14]

bool OpenXLSX::operator!= ( const XLRichText & lhs,
const XLRichText & rhs )
inline

◆ operator!=() [7/14]

bool OpenXLSX::operator!= ( const XLRichTextRun & lhs,
const XLRichTextRun & rhs )
inline

◆ operator!=() [8/14]

bool OpenXLSX::operator!= ( const XLRow & lhs,
const XLRow & rhs )
inline
Parameters
lhs
rhs
Returns

◆ operator!=() [9/14]

bool OpenXLSX::operator!= ( const XLStyle & lhs,
const XLStyle & rhs )
inlinenoexcept

◆ operator!=() [10/14]

bool OpenXLSX::operator!= ( const XLStyle::Alignment & lhs,
const XLStyle::Alignment & rhs )
inlinenoexcept

◆ operator!=() [11/14]

bool OpenXLSX::operator!= ( const XLStyle::Border & lhs,
const XLStyle::Border & rhs )
inlinenoexcept

◆ operator!=() [12/14]

bool OpenXLSX::operator!= ( const XLStyle::BorderElement & lhs,
const XLStyle::BorderElement & rhs )
inlinenoexcept

◆ operator!=() [13/14]

bool OpenXLSX::operator!= ( const XLStyle::Fill & lhs,
const XLStyle::Fill & rhs )
inlinenoexcept

◆ operator!=() [14/14]

bool OpenXLSX::operator!= ( const XLStyle::Font & lhs,
const XLStyle::Font & rhs )
inlinenoexcept

◆ operator+() [1/3]

XLRichText OpenXLSX::operator+ ( XLRichText lhs,
const std::string & rhs )
inline

◆ operator+() [2/3]

XLRichText OpenXLSX::operator+ ( XLRichText lhs,
const XLRichText & rhs )
inline

◆ operator+() [3/3]

XLRichText OpenXLSX::operator+ ( XLRichText lhs,
const XLRichTextRun & rhs )
inline

◆ operator<() [1/3]

bool OpenXLSX::operator< ( const XLCellReference & lhs,
const XLCellReference & rhs )
inlinenoexcept

Evaluates precedence primarily by row, then by column, allowing cell ranges to be sorted efficiently and sequentially from left-to-right, top-to-bottom.

◆ operator<() [2/3]

bool OpenXLSX::operator< ( const XLCellValue & lhs,
const XLCellValue & rhs )
inline
Parameters
lhs
rhs

◆ operator<() [3/3]

bool OpenXLSX::operator< ( const XLRow & lhs,
const XLRow & rhs )
inline
Parameters
lhs
rhs
Returns

◆ operator<<() [1/7]

std::ostream & OpenXLSX::operator<< ( std::ostream & os,
const XLCell & c )
inline

ostream output of XLCell content

Parameters
osthe ostream destination
cthe cell to output to the stream
Returns

◆ operator<<() [2/7]

std::ostream & OpenXLSX::operator<< ( std::ostream & os,
const XLCellAssignable & c )
inline

ostream output of XLCellAssignable content

Parameters
osthe ostream destination
cthe cell to output to the stream
Returns

◆ operator<<() [3/7]

std::ostream & OpenXLSX::operator<< ( std::ostream & os,
const XLCellIterator & it )
inline

◆ operator<<() [4/7]

std::ostream & OpenXLSX::operator<< ( std::ostream & os,
const XLCellValue & value )
inline
Parameters
os
value

◆ operator<<() [5/7]

std::ostream & OpenXLSX::operator<< ( std::ostream & os,
const XLCellValueProxy & value )
inline

◆ operator<<() [6/7]

std::ostream & OpenXLSX::operator<< ( std::ostream & os,
const XLFormula & value )
inline

send a formula string to an ostream

Parameters
osthe output destination
valuethe formula to send to os
Returns

◆ operator<<() [7/7]

std::ostream & OpenXLSX::operator<< ( std::ostream & os,
const XLFormulaProxy & value )
inline

send a formula string to an ostream

Parameters
osthe output destination
valuethe formula proxy whose formula to send to os
Returns

◆ operator<=() [1/3]

bool OpenXLSX::operator<= ( const XLCellReference & lhs,
const XLCellReference & rhs )
inlinenoexcept

Asserts whether a cell sequentially precedes or occupies the exact same coordinate as another.

◆ operator<=() [2/3]

bool OpenXLSX::operator<= ( const XLCellValue & lhs,
const XLCellValue & rhs )
inline
Parameters
lhs
rhs

◆ operator<=() [3/3]

bool OpenXLSX::operator<= ( const XLRow & lhs,
const XLRow & rhs )
inline
Parameters
lhs
rhs
Returns

◆ operator==() [1/14]

bool OpenXLSX::operator== ( const XLCell & lhs,
const XLCell & rhs )
inline
Parameters
lhs
rhs
Returns

◆ operator==() [2/14]

bool OpenXLSX::operator== ( const XLCellReference & lhs,
const XLCellReference & rhs )
inlinenoexcept

Determines exact coordinate identity, allowing comparisons without resolving their DOM node equivalence.

◆ operator==() [3/14]

bool OpenXLSX::operator== ( const XLCellValue & lhs,
const XLCellValue & rhs )
inline
Parameters
lhs
rhs

◆ operator==() [4/14]

bool OpenXLSX::operator== ( const XLColor & lhs,
const XLColor & rhs )
inline

Checks if two colors have identical ARGB channels.

◆ operator==() [5/14]

bool OpenXLSX::operator== ( const XLFormula & lhs,
const XLFormula & rhs )
inline
Parameters
lhs
rhs
Returns

◆ operator==() [6/14]

bool OpenXLSX::operator== ( const XLRichText & lhs,
const XLRichText & rhs )
inline

◆ operator==() [7/14]

bool OpenXLSX::operator== ( const XLRichTextRun & lhs,
const XLRichTextRun & rhs )
inline

◆ operator==() [8/14]

bool OpenXLSX::operator== ( const XLRow & lhs,
const XLRow & rhs )
inline
Parameters
lhs
rhs
Returns

◆ operator==() [9/14]

bool OpenXLSX::operator== ( const XLStyle & lhs,
const XLStyle & rhs )
inlinenoexcept

◆ operator==() [10/14]

bool OpenXLSX::operator== ( const XLStyle::Alignment & lhs,
const XLStyle::Alignment & rhs )
inlinenoexcept

◆ operator==() [11/14]

bool OpenXLSX::operator== ( const XLStyle::Border & lhs,
const XLStyle::Border & rhs )
inlinenoexcept

◆ operator==() [12/14]

bool OpenXLSX::operator== ( const XLStyle::BorderElement & lhs,
const XLStyle::BorderElement & rhs )
inlinenoexcept

◆ operator==() [13/14]

bool OpenXLSX::operator== ( const XLStyle::Fill & lhs,
const XLStyle::Fill & rhs )
inlinenoexcept

◆ operator==() [14/14]

bool OpenXLSX::operator== ( const XLStyle::Font & lhs,
const XLStyle::Font & rhs )
inlinenoexcept

◆ operator>() [1/3]

bool OpenXLSX::operator> ( const XLCellReference & lhs,
const XLCellReference & rhs )
inlinenoexcept

Inverts the less-than operator logic to verify strict left-to-right, top-to-bottom traversal dominance.

◆ operator>() [2/3]

bool OpenXLSX::operator> ( const XLCellValue & lhs,
const XLCellValue & rhs )
inline
Parameters
lhs
rhs

◆ operator>() [3/3]

bool OpenXLSX::operator> ( const XLRow & lhs,
const XLRow & rhs )
inline
Parameters
lhs
rhs
Returns

◆ operator>=() [1/3]

bool OpenXLSX::operator>= ( const XLCellReference & lhs,
const XLCellReference & rhs )
inlinenoexcept

Asserts whether a cell sequentially follows or occupies the exact same coordinate as another.

◆ operator>=() [2/3]

bool OpenXLSX::operator>= ( const XLCellValue & lhs,
const XLCellValue & rhs )
inline
Parameters
lhs
rhs

◆ operator>=() [3/3]

bool OpenXLSX::operator>= ( const XLRow & lhs,
const XLRow & rhs )
inline
Parameters
lhs
rhs
Returns

◆ pivotShowValuesAsFromString()

XLPivotShowValuesAs OpenXLSX::pivotShowValuesAsFromString ( std::string_view s)
nodiscard

◆ pivotShowValuesAsNeedsBaseField()

bool OpenXLSX::pivotShowValuesAsNeedsBaseField ( XLPivotShowValuesAs t)
nodiscard

◆ pivotShowValuesAsNeedsBaseItem()

bool OpenXLSX::pivotShowValuesAsNeedsBaseItem ( XLPivotShowValuesAs t)
nodiscard

◆ pivotShowValuesAsNeedsX14()

bool OpenXLSX::pivotShowValuesAsNeedsX14 ( XLPivotShowValuesAs t)
nodiscard

◆ pivotShowValuesAsToString()

const char * OpenXLSX::pivotShowValuesAsToString ( XLPivotShowValuesAs t)
nodiscard

◆ pivotSubtotalFromString()

XLPivotSubtotal OpenXLSX::pivotSubtotalFromString ( std::string_view s)
nodiscard

◆ pivotSubtotalToString()

const char * OpenXLSX::pivotSubtotalToString ( XLPivotSubtotal s)
nodiscard

◆ Rand32()

std::mt19937 OpenXLSX::Rand32 ( 0 )
thread_local

Use the std::mt19937 default return on operator()

◆ Rand64()

uint64_t OpenXLSX::Rand64 ( )

Return a 64 bit random value (by invoking Rand32 twice).

Returns
A 64 bit random value

Combine values from two subsequent invocations of Rand32()

◆ registerArrayFunctions()

void OpenXLSX::registerArrayFunctions ( XLFormulaRegistry & registry)

◆ registerDateTimeFunctions()

void OpenXLSX::registerDateTimeFunctions ( XLFormulaRegistry & registry)

◆ registerEngineeringFunctions()

void OpenXLSX::registerEngineeringFunctions ( XLFormulaRegistry & registry)

◆ registerFinancialFunctions()

void OpenXLSX::registerFinancialFunctions ( XLFormulaRegistry & registry)

◆ registerInfoFunctions()

void OpenXLSX::registerInfoFunctions ( XLFormulaRegistry & registry)

◆ registerLogicalFunctions()

void OpenXLSX::registerLogicalFunctions ( XLFormulaRegistry & registry)

◆ registerMathFunctions()

void OpenXLSX::registerMathFunctions ( XLFormulaRegistry & registry)

◆ registerStatisticalFunctions()

void OpenXLSX::registerStatisticalFunctions ( XLFormulaRegistry & registry)

◆ registerTextFunctions()

void OpenXLSX::registerTextFunctions ( XLFormulaRegistry & registry)

◆ reorderAttributes()

void OpenXLSX::reorderAttributes ( XMLNode & node)

Helper function to ensure attributes are in the correct OOXML order. Openpyxl order (which Excel likes): sqref, showDropDown, showInputMessage, showErrorMessage, allowBlank, errorTitle, error, promptTitle, prompt, type, operator, errorStyle.

◆ sanitizeXmlString()

std::string OpenXLSX::sanitizeXmlString ( std::string_view sv)
inline

Removes invalid XML 1.0 control characters from a string to prevent file corruption.

Parameters
svThe string view to sanitize
Returns
A new std::string containing only valid XML 1.0 characters

◆ setAttr() [1/5]

XMLAttribute OpenXLSX::setAttr ( XMLNode & node,
const char * attrName,
const char * attrVal )
inline

Ensure attribute exists and always set its value (string).

◆ setAttr() [2/5]

XMLAttribute OpenXLSX::setAttr ( XMLNode & node,
const char * attrName,
std::string const & attrVal )
inline

◆ setAttr() [3/5]

XMLAttribute OpenXLSX::setAttr ( XMLNode & node,
const char * attrName,
std::string_view attrVal )
inline

◆ setAttr() [4/5]

template<typename T, typename = std::enable_if_t<std::is_arithmetic_v<T>>>
XMLAttribute OpenXLSX::setAttr ( XMLNode & node,
const char * attrName,
T attrVal )
inline

Ensure attribute exists and set a numeric / bool value via XMLAttribute::set_value overloads.

Note
Constrained to arithmetic types so std::string rvalues bind to the string overloads above.

◆ setAttr() [5/5]

XMLAttribute OpenXLSX::setAttr ( XMLNode & node,
std::string const & attrName,
std::string const & attrVal )
inline

◆ setAttrBool01()

XMLAttribute OpenXLSX::setAttrBool01 ( XMLNode & node,
const char * attrName,
bool value )
inline

Excel-style boolean attribute as "1" / "0".

◆ setAttrBoolTF()

XMLAttribute OpenXLSX::setAttrBoolTF ( XMLNode & node,
const char * attrName,
bool value )
inline

Boolean attribute as "true" / "false".

◆ setChildAttr() [1/2]

XMLAttribute OpenXLSX::setChildAttr ( XMLNode & parent,
const char * nodeName,
const char * attrName,
const char * attrVal,
bool removeAttributes = XLKeepAttributes,
std::vector< std::string_view > const & nodeOrder = {} )
inline

Ensure child exists, optionally clear its attributes, then set attrName.

◆ setChildAttr() [2/2]

XMLAttribute OpenXLSX::setChildAttr ( XMLNode & parent,
std::string const & nodeName,
std::string const & attrName,
std::string const & attrVal,
bool removeAttributes = XLKeepAttributes,
std::vector< std::string_view > const & nodeOrder = {} )
inline

◆ setChildText()

XMLNode OpenXLSX::setChildText ( XMLNode & parent,
const char * childName,
std::string_view text,
std::vector< std::string_view > const & nodeOrder = {} )
inline

Ensure child exists (optional order) and set its text content.

◆ setChildVal() [1/2]

XMLAttribute OpenXLSX::setChildVal ( XMLNode & parent,
const char * childName,
const char * value,
std::vector< std::string_view > const & nodeOrder = {} )
inline

Ensure child childName exists under parent and set its @val attribute.

◆ setChildVal() [2/2]

XMLAttribute OpenXLSX::setChildVal ( XMLNode & parent,
const char * childName,
std::string_view value,
std::vector< std::string_view > const & nodeOrder = {} )
inline

◆ setDefaultCellAttributes() [1/2]

void OpenXLSX::setDefaultCellAttributes ( XMLNode cellNode,
const char * cellRef,
XMLNode rowNode,
uint16_t colNo,
std::vector< XLStyleIndex > const & colStyles = {} )
inline

Overload accepting const char* for cell reference - avoids std::string allocation Performance optimization: for use in hot loops where address generation is frequent.

◆ setDefaultCellAttributes() [2/2]

void OpenXLSX::setDefaultCellAttributes ( XMLNode cellNode,
const std::string & cellRef,
XMLNode rowNode,
uint16_t colNo,
std::vector< XLStyleIndex > const & colStyles = {} )
inline

set the cell reference, and a default cell style attribute if and only if row or column style is != XLDefaultCellFormat

Note
row style takes precedence over column style
Parameters
cellNodethe cell XML node
cellRefthe cell reference (attribute r) to set
rowNodethe row node for the cell
colNothe column number for this cell (to try and fetch a column style)
colStylesan optional std::vector<XLStyleIndex> that contains all pre-evaluated column styles, and can be used to avoid performance impact from lookup

◆ setFormulaRandomSeed()

Seed the formula RNG (thread-local engines reseed on next use).

When set, RAND/RANDBETWEEN/RANDARRAY produce reproducible sequences within each thread. Call clearFormulaRandomSeed() to restore non-deterministic seeding via std::random_device.

◆ setTabColor()

void OpenXLSX::setTabColor ( const XMLDocument & xmlDocument,
const XLColor & color )

Function for setting tab color.

Parameters
xmlDocumentXMLDocument object
colorThr color to set

◆ setTableAttribute()

void OpenXLSX::setTableAttribute ( XMLNode & node,
std::string_view name,
std::string_view value )

Helper to set table attributes in the correct physical order.

◆ setTabSelected()

void OpenXLSX::setTabSelected ( const XMLDocument & xmlDocument,
bool selected )

Set the tab selected property to desired value.

Parameters
xmlDocument
selected

◆ setVal() [1/2]

XMLAttribute OpenXLSX::setVal ( XMLNode & node,
const char * value )
inline

Set the @val attribute on node.

◆ setVal() [2/2]

XMLAttribute OpenXLSX::setVal ( XMLNode & node,
std::string_view value )
inline

◆ spillArray()

size_t OpenXLSX::spillArray ( const XLFormulaArg & result,
uint32_t topRow,
uint16_t leftCol,
const XLSpillWriter & write )

Write a (possibly multi-cell) formula result into a rectangular spill range.

Parameters
resultMaterialized or lazy array/range/scalar result.
topRow1-based top-left row of the spill anchor.
leftCol1-based top-left column of the spill anchor.
writeInvoked once per output cell (row-major).
Returns
Number of cells written.

◆ spillArrayChecked()

XLSpillResult OpenXLSX::spillArrayChecked ( const XLFormulaArg & result,
uint32_t topRow,
uint16_t leftCol,
const XLSpillWriter & write,
const XLSpillOccupancy & isOccupied,
uint32_t anchorRow = 0,
uint16_t anchorCol = 0 )

Spill with #SPILL! detection: writes only when the target range is clear.

On conflict, no cells are written and result.error is set to #SPILL!.

◆ spillRangeIsClear()

bool OpenXLSX::spillRangeIsClear ( const XLFormulaArg & result,
uint32_t topRow,
uint16_t leftCol,
const XLSpillOccupancy & isOccupied,
uint32_t anchorRow = 0,
uint16_t anchorCol = 0 )

Check whether a spill rectangle is free of blocking occupants.

Parameters
isOccupiedReturn true for cells that block spill (non-empty foreign content).
anchorRow/anchorColThe formula cell itself is never treated as a blocker.

◆ strTrim()

std::string OpenXLSX::formula::strTrim ( std::string s)
nodiscard

◆ tabIsSelected()

bool OpenXLSX::tabIsSelected ( const XMLDocument & xmlDocument)

Function for checking if the tab is selected.

Parameters
xmlDocument
Returns

◆ toDouble()

double OpenXLSX::formula::toDouble ( const XLCellValue & v)
nodiscard

Convert Integer / Float / Boolean to double; NaN for other types.

◆ toString()

std::string OpenXLSX::formula::toString ( const XLCellValue & v)
nodiscard

Stringify a cell value for text functions; empty for non-displayable types.

◆ tryParseNumericString()

bool OpenXLSX::formula::tryParseNumericString ( std::string_view s,
double & out )
nodiscard

Parse a fully-numeric string (optional leading/trailing space) to double.

Returns
true when the entire trimmed string is a valid number.

◆ UseRandomIDs()

void OpenXLSX::UseRandomIDs ( )

Enable use of random (relationship) IDs.

Set the module-local status variable RandomIDs to true

◆ UseSequentialIDs()

void OpenXLSX::UseSequentialIDs ( )

Disable use of random (relationship) IDs (default behavior).

Set the module-local status variable RandomIDs to false

◆ wouldBeDuplicateShapeType()

bool OpenXLSX::wouldBeDuplicateShapeType ( XMLNode const & rootNode,
XMLNode const & shapeTypeNode )

◆ XLAboveAverageRule()

XLCfRule OpenXLSX::XLAboveAverageRule ( bool aboveAverage = true,
bool equalAverage = false,
int16_t stdDev = 0 )

◆ XLCellIsRule() [1/2]

XLCfRule OpenXLSX::XLCellIsRule ( const std::string & op,
const std::string & value )

◆ XLCellIsRule() [2/2]

XLCfRule OpenXLSX::XLCellIsRule ( XLCfOperator op,
const std::string & value )

◆ XLCfOperatorFromString()

XLCfOperator OpenXLSX::XLCfOperatorFromString ( std::string const & operatorString)

get the correct XLCfOperator from the OOXML cfRule operator attribute string

Parameters
operatorStringthe string as used in the OOXML
Returns
the corresponding XLCfOperator enum value

◆ XLCfOperatorToString()

std::string OpenXLSX::XLCfOperatorToString ( XLCfOperator cfOperator)

inverse of XLCfOperatorFromString

Parameters
cfOperatorthe XLCfOperator for which to get the OOXML string

◆ XLCfTimePeriodFromString()

XLCfTimePeriod OpenXLSX::XLCfTimePeriodFromString ( std::string const & timePeriodString)

get the correct XLCfTimePeriod from the OOXML cfRule timePeriod attribute string

Parameters
timePeriodStringthe string as used in the OOXML
Returns
the corresponding XLCfTimePeriod enum value

◆ XLCfTimePeriodToString()

std::string OpenXLSX::XLCfTimePeriodToString ( XLCfTimePeriod cfTimePeriod)

inverse of XLCfTimePeriodFromString

Parameters
cfTimePeriodthe XLCfTimePeriod for which to get the OOXML string

◆ XLCfTypeFromString()

XLCfType OpenXLSX::XLCfTypeFromString ( std::string const & typeString)

get the correct XLCfType from the OOXML cfRule type attribute string

Parameters
typeStringthe string as used in the OOXML
Returns
the corresponding XLCfType enum value

◆ XLCfTypeToString()

std::string OpenXLSX::XLCfTypeToString ( XLCfType cfType)

inverse of XLCfTypeFromString

Parameters
cfTypethe type for which to get the OOXML string

◆ XLCfvoTypeFromString()

XLCfvoType OpenXLSX::XLCfvoTypeFromString ( std::string const & cfvoTypeString)

◆ XLCfvoTypeToString()

std::string OpenXLSX::XLCfvoTypeToString ( XLCfvoType cfvoType)

◆ XLColorScaleRule() [1/2]

XLCfRule OpenXLSX::XLColorScaleRule ( const XLColor & minColor,
const XLColor & maxColor )

◆ XLColorScaleRule() [2/2]

XLCfRule OpenXLSX::XLColorScaleRule ( const XLColor & minColor,
const XLColor & midColor,
const XLColor & maxColor )

◆ XLContainsBlanksRule()

XLCfRule OpenXLSX::XLContainsBlanksRule ( )

◆ XLContainsErrorsRule()

XLCfRule OpenXLSX::XLContainsErrorsRule ( )

◆ XLContainsTextRule()

XLCfRule OpenXLSX::XLContainsTextRule ( const std::string & text)

◆ XLContentTypeString()

std::string OpenXLSX::XLContentTypeString ( OpenXLSX::XLContentType const & t)
inline

Get a string representation of OpenXLSX::XLContentType.

Parameters
tan OpenXLSX::XLContentType value
Returns
a std::string containing the descriptive name of the content type

◆ XLContentTypeToString()

std::string OpenXLSX::XLContentTypeToString ( XLContentType type)

utility function: determine the name of an XLContentType value

Parameters
typethe XLContentType to get a name for
Returns
a string with the name of type

◆ XLDataBarAxisPositionFromString()

XLDataBarAxisPosition OpenXLSX::XLDataBarAxisPositionFromString ( std::string const & positionString)

◆ XLDataBarAxisPositionToString()

std::string OpenXLSX::XLDataBarAxisPositionToString ( XLDataBarAxisPosition position)

◆ XLDataBarDirectionFromString()

XLDataBarDirection OpenXLSX::XLDataBarDirectionFromString ( std::string const & directionString)

◆ XLDataBarDirectionToString()

std::string OpenXLSX::XLDataBarDirectionToString ( XLDataBarDirection direction)

◆ XLDataBarRule()

XLCfRule OpenXLSX::XLDataBarRule ( const XLColor & color,
bool showValue = true )

◆ XLDuplicateValuesRule()

XLCfRule OpenXLSX::XLDuplicateValuesRule ( bool unique = false)

◆ XLDynamicFilterTypeToString()

std::string OpenXLSX::XLDynamicFilterTypeToString ( XLDynamicFilterType type)

Helper function to convert enum to string.

◆ XLFormulaRule()

XLCfRule OpenXLSX::XLFormulaRule ( const std::string & formula)

◆ XLIconSetRule()

XLCfRule OpenXLSX::XLIconSetRule ( const std::string & iconSetName = "3TrafficLights1",
bool showValue = true,
bool reverse = false )

◆ XLNotContainsBlanksRule()

XLCfRule OpenXLSX::XLNotContainsBlanksRule ( )

◆ XLNotContainsErrorsRule()

XLCfRule OpenXLSX::XLNotContainsErrorsRule ( )

◆ XLNotContainsTextRule()

XLCfRule OpenXLSX::XLNotContainsTextRule ( const std::string & text)

◆ XLPaneFromString()

XLPane OpenXLSX::XLPaneFromString ( std::string const & paneString)

inverse of XLPaneToString

Parameters
paneStringthe string for which to get the XLPane

◆ XLPaneStateFromString()

XLPaneState OpenXLSX::XLPaneStateFromString ( std::string const & stateString)

inverse of XLPaneStateToString

Parameters
stateStringthe string for which to get the XLPaneState

◆ XLPaneStateToString()

std::string OpenXLSX::XLPaneStateToString ( XLPaneState state)

get the correct XLPaneState from the OOXML pane state attribute string

Parameters
stateStringthe string as used in the OOXML
Returns
the corresponding XLPaneState enum value

◆ XLPaneToString()

std::string OpenXLSX::XLPaneToString ( XLPane pane)

get the correct XLPane from the OOXML pane identifier attribute string

Parameters
paneStringthe string as used in the OOXML
Returns
the corresponding XLPane enum value

◆ XLRelationshipTypeString()

std::string OpenXLSX::XLRelationshipTypeString ( OpenXLSX::XLRelationshipType const & t)
inline

Get a string representation of OpenXLSX::XLRelationshipType.

Parameters
tan OpenXLSX::XLRelationshipType value
Returns
std::string containing the descriptive name of the relationship type

◆ XLShapeTextHAlignFromString()

XLShapeTextHAlign OpenXLSX::XLShapeTextHAlignFromString ( std::string_view hAlignString)

◆ XLShapeTextHAlignToString()

std::string OpenXLSX::XLShapeTextHAlignToString ( XLShapeTextHAlign hAlign)

◆ XLShapeTextVAlignFromString()

XLShapeTextVAlign OpenXLSX::XLShapeTextVAlignFromString ( std::string_view vAlignString)

◆ XLShapeTextVAlignToString()

std::string OpenXLSX::XLShapeTextVAlignToString ( XLShapeTextVAlign vAlign)

◆ xlSlicerStyleFromString()

XLSlicerStyle OpenXLSX::xlSlicerStyleFromString ( std::string_view s)

Convert a raw style string to XLSlicerStyle enum (Custom if unrecognized).

◆ xlSlicerStyleToString()

std::string OpenXLSX::xlSlicerStyleToString ( XLSlicerStyle style)

Convert XLSlicerStyle enum to its Excel XML string representation.

◆ XLTop10Rule()

XLCfRule OpenXLSX::XLTop10Rule ( uint16_t rank = 10,
bool percent = false,
bool bottom = false )

◆ XLValueTypeString()

std::string OpenXLSX::XLValueTypeString ( XLValueType t)
inline

Get a string representation of pugi::xml_node_type.

Parameters
tthe pugi::xml_node_type of a node
Returns
a std::string containing the descriptive name of the node type

◆ xml_node_type_string()

std::string OpenXLSX::xml_node_type_string ( XMLNodeType t)
inline

Get a string representation of XMLNodeType.

Parameters
tthe XMLNodeType of a node
Returns
a std::string containing the descriptive name of the node type

◆ xmlNodeFingerprint()

std::string OpenXLSX::xmlNodeFingerprint ( const XMLNode & node)
inline

◆ xmlNodeFingerprintImpl()

void OpenXLSX::xmlNodeFingerprintImpl ( const XMLNode & node,
std::string & fp )
inline

Compute a canonical, deterministic string fingerprint of a pugixml subtree.

Walks attributes (in document order) and element children recursively. Whitespace-only pcdata nodes are skipped so that XML indentation differences do not create false mismatches. The resulting string is suitable as a key in hash tables for O(1) style deduplication lookups.

Variable Documentation

◆ ColumnNodeOrder

const std::vector<std::string_view> OpenXLSX::ColumnNodeOrder = {"calculatedColumnFormula", "totalsRowFormula", "xmlColumnPr", "extLst"}

◆ DEFAULT_IMAGE_SIZE

uint32_t OpenXLSX::DEFAULT_IMAGE_SIZE = 100
constexpr

◆ EMU_PER_PIXEL

uint32_t OpenXLSX::EMU_PER_PIXEL = 9525
constexpr

◆ MAX_COLS

uint16_t OpenXLSX::MAX_COLS = 16'384
inlineconstexpr

◆ MAX_ROWS

uint32_t OpenXLSX::MAX_ROWS = 1'048'576
inlineconstexpr

◆ MAX_SHAPE_ANCHOR_COLUMN

uint16_t OpenXLSX::MAX_SHAPE_ANCHOR_COLUMN = 13067
inlineconstexpr

◆ MAX_SHAPE_ANCHOR_ROW

uint32_t OpenXLSX::MAX_SHAPE_ANCHOR_ROW = 852177
inlineconstexpr

◆ node_cdata

XMLNodeType OpenXLSX::node_cdata = 4
constexpr

◆ node_comment

XMLNodeType OpenXLSX::node_comment = 5
constexpr

◆ node_declaration

XMLNodeType OpenXLSX::node_declaration = 6
constexpr

◆ node_doctype

XMLNodeType OpenXLSX::node_doctype = 7
constexpr

◆ node_document

XMLNodeType OpenXLSX::node_document = 1
constexpr

◆ node_element

XMLNodeType OpenXLSX::node_element = 2
constexpr

◆ node_null

XMLNodeType OpenXLSX::node_null = 0
constexpr

◆ node_pcdata

XMLNodeType OpenXLSX::node_pcdata = 3
constexpr

◆ node_pi

XMLNodeType OpenXLSX::node_pi = 8
constexpr

◆ pugi_parse_settings

const unsigned int OpenXLSX::pugi_parse_settings = 0x001e
constexpr

◆ Rand32

std::mt19937 OpenXLSX::Rand32
externthread_local

Return a 32 bit random value.

Returns
A 32 bit random value

◆ ShapeNodeName

std::string_view OpenXLSX::ShapeNodeName = "v:shape"
constexpr

◆ ShapeTypeNodeName

std::string_view OpenXLSX::ShapeTypeNodeName = "v:shapetype"
constexpr

◆ SORT_INDEX_NOT_FOUND

int OpenXLSX::SORT_INDEX_NOT_FOUND = -1
constexpr

◆ status_append_invalid_root

XMLParseStatus OpenXLSX::status_append_invalid_root = 15
constexpr

◆ status_bad_attribute

XMLParseStatus OpenXLSX::status_bad_attribute = 12
constexpr

◆ status_bad_cdata

XMLParseStatus OpenXLSX::status_bad_cdata = 8
constexpr

◆ status_bad_comment

XMLParseStatus OpenXLSX::status_bad_comment = 7
constexpr

◆ status_bad_doctype

XMLParseStatus OpenXLSX::status_bad_doctype = 9
constexpr

◆ status_bad_end_element

XMLParseStatus OpenXLSX::status_bad_end_element = 13
constexpr

◆ status_bad_pcdata

XMLParseStatus OpenXLSX::status_bad_pcdata = 10
constexpr

◆ status_bad_pi

XMLParseStatus OpenXLSX::status_bad_pi = 6
constexpr

◆ status_bad_start_element

XMLParseStatus OpenXLSX::status_bad_start_element = 11
constexpr

◆ status_end_element_mismatch

XMLParseStatus OpenXLSX::status_end_element_mismatch = 14
constexpr

◆ status_file_not_found

XMLParseStatus OpenXLSX::status_file_not_found = 1
constexpr

◆ status_internal_error

XMLParseStatus OpenXLSX::status_internal_error = 4
constexpr

◆ status_io_error

XMLParseStatus OpenXLSX::status_io_error = 2
constexpr

◆ status_no_document_element

XMLParseStatus OpenXLSX::status_no_document_element = 16
constexpr

◆ status_ok

XMLParseStatus OpenXLSX::status_ok = 0
constexpr

◆ status_out_of_memory

XMLParseStatus OpenXLSX::status_out_of_memory = 3
constexpr

◆ status_unrecognized_tag

XMLParseStatus OpenXLSX::status_unrecognized_tag = 5
constexpr

◆ TableAttributeOrder

const std::vector<std::string_view> OpenXLSX::TableAttributeOrder
Initial value:
= {"id",
"name",
"displayName",
"ref",
"tableType",
"headerRowDxfId",
"dataDxfId",
"headerRowCount",
"insertRow",
"insertRowShift",
"totalsRowCount",
"totalsRowShown",
"published",
"comment"}

The TableAttributeOrder defines the mandatory physical sequence of attributes in the.

.

◆ TableNodeOrder

const std::vector<std::string_view> OpenXLSX::TableNodeOrder = {"autoFilter", "sortState", "tableColumns", "tableStyleInfo", "extLst"}

The TableNodeOrder vector defines the order of nodes in the table XML file.

◆ XLCreateIfMissing

const bool OpenXLSX::XLCreateIfMissing = true
constexpr

◆ XLDefaultCellFormat

const XLStyleIndex OpenXLSX::XLDefaultCellFormat = 0
constexpr

◆ XLDefaultCfRulePrefix

const char* OpenXLSX::XLDefaultCfRulePrefix = "\n\t\t"
constexpr

◆ XLDefaultConditionalFormattingPrefix

const char* OpenXLSX::XLDefaultConditionalFormattingPrefix = "\n\t"
constexpr

◆ XLDefaultFillType

const XLFillType OpenXLSX::XLDefaultFillType = XLPatternFill
constexpr

◆ XLDefaultFontCharset

const uint32_t OpenXLSX::XLDefaultFontCharset = 1
constexpr

◆ XLDefaultFontColor

const char* OpenXLSX::XLDefaultFontColor = "ff000000"
constexpr

◆ XLDefaultFontColorTheme

const char* OpenXLSX::XLDefaultFontColorTheme = ""
constexpr

◆ XLDefaultFontFamily

const uint32_t OpenXLSX::XLDefaultFontFamily = 0
constexpr

◆ XLDefaultFontName

const char* OpenXLSX::XLDefaultFontName = "Arial"
constexpr

◆ XLDefaultFontSize

const uint32_t OpenXLSX::XLDefaultFontSize = 12
constexpr

◆ XLDefaultLineStyle

const char* OpenXLSX::XLDefaultLineStyle = ""
constexpr

◆ XLDefaultPatternBgColor

const char* OpenXLSX::XLDefaultPatternBgColor = "ff000000"
constexpr

◆ XLDefaultPatternFgColor

const char* OpenXLSX::XLDefaultPatternFgColor = "ffffffff"
constexpr

◆ XLDefaultPatternType

const XLPatternType OpenXLSX::XLDefaultPatternType = XLPatternNone
constexpr

◆ XLDefaultShapeTextHAlign

const XLShapeTextHAlign OpenXLSX::XLDefaultShapeTextHAlign = XLShapeTextHAlign::Left
constexpr

◆ XLDefaultShapeTextVAlign

const XLShapeTextVAlign OpenXLSX::XLDefaultShapeTextVAlign = XLShapeTextVAlign::Top
constexpr

◆ XLDefaultStyleEntriesPrefix

const char* OpenXLSX::XLDefaultStyleEntriesPrefix = "\n\t\t"
constexpr

◆ XLDefaultStylesPrefix

const char* OpenXLSX::XLDefaultStylesPrefix = "\n\t"
constexpr

◆ XLDeleteProperty

const uint32_t OpenXLSX::XLDeleteProperty = XLInvalidUInt32
constexpr

◆ XLDoNotCreate

const bool OpenXLSX::XLDoNotCreate = false
constexpr

◆ XLDoNotOverwrite

const bool OpenXLSX::XLDoNotOverwrite = false
constexpr

◆ XLEmptyHiddenCells

const bool OpenXLSX::XLEmptyHiddenCells = true
constexpr

◆ XLForceFillType

const bool OpenXLSX::XLForceFillType = true
constexpr

◆ XLForceNamespace

const bool OpenXLSX::XLForceNamespace = true
constexpr

◆ XLForceOverwrite

const bool OpenXLSX::XLForceOverwrite = true
constexpr

◆ XLInvalidStyleIndex

const XLStyleIndex OpenXLSX::XLInvalidStyleIndex = XLInvalidUInt32
constexpr

◆ XLInvalidUInt16

const uint32_t OpenXLSX::XLInvalidUInt16 = 0xffff
constexpr

◆ XLInvalidUInt32

const uint32_t OpenXLSX::XLInvalidUInt32 = 0xffffffff
constexpr

◆ XLKeepAttributes

bool OpenXLSX::XLKeepAttributes = false
constexpr

◆ XLKeepCellFormula

const uint32_t OpenXLSX::XLKeepCellFormula = 8
constexpr

◆ XLKeepCellStyle

const uint32_t OpenXLSX::XLKeepCellStyle = 1
constexpr

◆ XLKeepCellType

const uint32_t OpenXLSX::XLKeepCellType = 2
constexpr

◆ XLKeepCellValue

const uint32_t OpenXLSX::XLKeepCellValue = 4
constexpr

◆ XLMaxMergeCells

size_t OpenXLSX::XLMaxMergeCells = (std::numeric_limits<XLMergeIndex>::max)()
constexpr

◆ XLMaxSharedStrings

size_t OpenXLSX::XLMaxSharedStrings = (std::numeric_limits<int32_t>::max)()
constexpr

◆ XLMergeNotFound

const XLMergeIndex OpenXLSX::XLMergeNotFound = -1
constexpr

◆ XLPermitXfID

const bool OpenXLSX::XLPermitXfID = true
constexpr

◆ XLPreserveValue

bool OpenXLSX::XLPreserveValue = false
constexpr

◆ XLPriorityNotSet

const uint16_t OpenXLSX::XLPriorityNotSet = 0
constexpr

◆ XLRemoveAttributes

bool OpenXLSX::XLRemoveAttributes = true
constexpr

◆ XLResetValue

bool OpenXLSX::XLResetValue = true
constexpr

◆ XLSharedStringsDefaulted

const XLSharedStrings OpenXLSX::XLSharedStringsDefaulted {}

◆ XLSheetViewNodeOrder

const std::vector<std::string_view> OpenXLSX::XLSheetViewNodeOrder
Initial value:
= {
"pane",
"selection",
"pivotSelection",
"extLst"}

◆ XLWorksheetNodeOrder

const std::vector<std::string_view> OpenXLSX::XLWorksheetNodeOrder

◆ XLXmlDefaultEncoding

const char* OpenXLSX::XLXmlDefaultEncoding = "UTF-8"
constexpr

◆ XLXmlDefaultVersion

const char* OpenXLSX::XLXmlDefaultVersion = "1.0"
constexpr

◆ XLXmlNotStandalone

const bool OpenXLSX::XLXmlNotStandalone = false
constexpr

◆ XLXmlStandalone

const bool OpenXLSX::XLXmlStandalone = true
constexpr