---
Product: Aspose.Cells
Platform: cpp
Page Type: reference
Canonical URL: https://reference.aspose.org/cells/cpp/xlsxworkbookstylesxml
---

# XlsxWorkbookStylesXml

## Overview

`XlsxWorkbookStylesXml` is a class in Aspose.Cells FOSS for C++.

Provides XML read/write methods for the workbook styles part.

This class declares 14 methods for XlsxWorkbookStylesXml objects in C++ programs.
Available methods include: `BuildBorderElements`, `BuildCellFormatElements`, `BuildDifferentialFormatElements`, `BuildFillElements`, `BuildFontElements`, `BuildStylesheetDocument`, `ParseHorizontalAlignment`, `ParseOptionalBoolAttribute`, `ParseVerticalAlignment`, `ReadBordersValues`, `ReadDifferentialStyleValues`, `ReadFillValues`, and 2 additional methods.
Public members are accessible to any C++ application after installing the Aspose.Cells FOSS for C++ package.

## Methods

| Signature | Description |
|-----------|-------------|
| `XlsxWorkbookStylesXml()` | Calls XlsxWorkbookStylesXml on this XlsxWorkbookStylesXml instance. |
| `BuildStylesheetDocument(fonts: std::vector<Core::FontValue>, fills: std::vector<FillValue>, borders: std::vector<Core::BordersValue>, normalCellFormat: CellFormatValue, cellFormats: std::vector<CellFormatValue>, customNumberFormats: std::vector<std::pair<int, std::string>>, differentialFormats: std::vector<Core::StyleValue>)` → `XmlDocument` | Builds the stylesheet XML document from the given style collections. |
| `ReadFontValues(root: XmlElement)` → `std::vector<Core::FontValue>` | Reads font values from the stylesheet root element. |
| `ReadFillValues(root: XmlElement)` → `std::vector<FillValue>` | Reads fill values from the stylesheet root element. |
| `ReadBordersValues(root: XmlElement)` → `std::vector<Core::BordersValue>` | Reads borders values from the stylesheet root element. |
| `ReadDifferentialStyleValues(root: XmlElement)` → `std::vector<Core::StyleValue>` | Reads differential style values from the stylesheet root element. |
| `BuildFontElements(fonts: std::vector<Core::FontValue>)` → `std::vector<XmlElement>` | Builds XML elements for the given font values. |
| `BuildFillElements(fills: std::vector<FillValue>)` → `std::vector<XmlElement>` | Builds XML elements for the given fill values. |
| `BuildBorderElements(borders: std::vector<Core::BordersValue>)` → `std::vector<XmlElement>` | Builds XML elements for the given border values. |
| `BuildCellFormatElements(cellFormats: std::vector<CellFormatValue>)` → `std::vector<XmlElement>` | Builds XML elements for the given cell format values. |
| `BuildDifferentialFormatElements(differentialFormats: std::vector<Core::StyleValue>)` → `std::vector<XmlElement>` | Builds XML elements for the given differential format values. |
| `ParseHorizontalAlignment(value: std::string_view)` → `Core::HorizontalAlignment` | Parses a horizontal alignment name string to the corresponding enum value. |
| `ParseVerticalAlignment(value: std::string_view)` → `Core::VerticalAlignment` | Parses a vertical alignment name string to the corresponding enum value. |
| `ParseOptionalBoolAttribute(attribute: XmlAttribute)` → `std::optional<bool>` | Parses an optional boolean attribute. Returns nullopt if the attribute is null. |

## See Also

- [Aspose.Cells — Enterprise API Reference](https://reference.aspose.com/cells/)