XlsxWorkbookSerializerCommon
Overview
XlsxWorkbookSerializerCommon is a class in Aspose.Cells FOSS for C++.
Constants and helpers shared across the XLSX workbook serializer.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
WorksheetRelationshipType | std::string | Read/Write | |
SharedStringsRelationshipType | std::string | Read/Write | |
StylesRelationshipType | std::string | Read/Write | |
CorePropertiesRelationshipType | std::string | Read/Write | |
ExtendedPropertiesRelationshipType | std::string | Read/Write | |
MainNs | XNamespace | Read/Write | |
RelationshipNs | XNamespace | Read/Write | |
PackageRelationshipNs | XNamespace | Read/Write | |
ContentTypeNs | XNamespace | Read/Write | |
XmlNs | XNamespace | Read/Write | |
BuiltInDateFormats | std::unordered_set<int> | Read/Write |
Methods
| Signature | Description |
|---|---|
ShouldPersistCell(workbookDefaultStyle: Core::StyleValue, record: Core::CellRecord) → bool | Returns true if the cell record should be persisted to the worksheet XML. |
WriteXmlEntry(archive: ZipArchive, path: std::string_view, document: XmlDocument) | Serializes an XmlDocument to UTF-8 and writes it as a ZIP entry. |
BuildContentTypes(model: Core::WorkbookModel, hasSharedStrings: bool, hasDateStyles: bool, hasCoreProperties: bool, hasExtendedProperties: bool) → XmlDocument | Builds the [Content_Types].xml document. |
BuildRootRelationships(hasCoreProperties: bool, hasExtendedProperties: bool) → XmlDocument | Builds the root _rels/.rels document. |
BuildWorkbook(model: Core::WorkbookModel) → XmlDocument | Builds the xl/workbook.xml document. |
BuildWorkbookRelationships(model: Core::WorkbookModel, hasSharedStrings: bool, hasDateStyles: bool) → XmlDocument | Builds the xl/_rels/workbook.xml.rels document. |
BuildWorksheet(worksheet: Core::WorksheetModel, workbookDefaultStyle: Core::StyleValue, dateSystem: Core::DateSystem, sharedStrings: Core::SharedStringRepository, options: SaveOptions, stylesheet: StylesheetSaveContext) → XmlDocument | Builds an xl/worksheets/sheetN.xml document. |
BuildSharedStrings(sharedStrings: Core::SharedStringRepository) → XmlDocument | Builds the xl/sharedStrings.xml document. |
BuildMinimalStylesheet() → XmlDocument | Builds a minimal xl/styles.xml document. |
BuildRowElement(rowIndex: int, rowModel: Core::RowModel, rowCells: std::vector<std::pair<Core::CellAddress, Core::CellRecord>>, dateSystem: Core::DateSystem, sharedStrings: Core::SharedStringRepository, options: SaveOptions, stylesheet: StylesheetSaveContext) → XmlElement | Builds a row element with its child cells. |
BuildColumnElement(column: Core::ColumnRangeModel) → XmlElement | Builds a col element for a column range. |
BuildCell(address: Core::CellAddress, record: Core::CellRecord, dateSystem: Core::DateSystem, sharedStrings: Core::SharedStringRepository, options: SaveOptions, stylesheet: StylesheetSaveContext) → XmlElement | Builds a cell element (c element). |
CreateTextElement(value: std::string_view) → XmlElement | Creates a text element (t element) with optional xml:space=“preserve”. |
HasRowMetadata(rowModel: Core::RowModel) → bool | Returns true if the row model has any non-default metadata. |
HasColumnMetadata(column: Core::ColumnRangeModel) → bool | Returns true if the column range has any non-default metadata. |
NeedsPreserveWhitespace(value: std::string_view) → bool | Checks whether a string value needs xml:space=“preserve”. |
GetWorksheetRowIndexes(persistedCells: std::vector<std::pair<Core::CellAddress, Core::CellRecord>>, rows: std::unordered_map<int, Core::RowModel>) → std::vector<int> | Collects and sorts the union of row indexes from persisted cells and row metadata. |
NormalizeColumnRanges(columns: std::vector<Core::ColumnRangeModel>) → std::vector<Core::ColumnRangeModel> | Filters, sorts, and merges adjacent column ranges that share the same metadata. |
ColumnMetadataEqual(left: Core::ColumnRangeModel, right: Core::ColumnRangeModel) → bool | Returns true if two column ranges have identical metadata. |
CalculateDimensionReference(persistedCells: std::vector<std::pair<Core::CellAddress, Core::CellRecord>>, mergeRegions: std::vector<Core::MergeRegion>) → std::string | Calculates the dimension reference string for the sheetData dimension element. |
ToRangeReference(region: Core::MergeRegion) → std::string | Converts a merge region to a range reference string (e.g. “A1:B2”). |
TryParseMergeReference(mergeReference: std::string_view, region: Core::MergeRegion) → bool | Parses a range reference string into a merge region. Returns true on success. |
TryParseCellReference(cellReference: std::string_view, address: Core::CellAddress) → bool | Parses a cell reference string into a CellAddress. Returns true on success. |