|
OpenXLSX 1.12.1
Modern C++ Excel Library (Fork of OpenXLSX by Kenneth Troldal Balslev)
|
#include <XLStreamWriter.hpp>
Public Member Functions | |
| XLStreamWriter ()=default | |
| XLStreamWriter (const XLStreamWriter &)=delete | |
| XLStreamWriter & | operator= (const XLStreamWriter &)=delete |
| XLStreamWriter (XLStreamWriter &&other) noexcept | |
| XLStreamWriter & | operator= (XLStreamWriter &&other) noexcept |
| ~XLStreamWriter () | |
| bool | isStreamActive () const |
| void | setColWidth (uint16_t minCol, uint16_t maxCol, double width) |
| Set column width for [minCol, maxCol] (1-based, inclusive). excelize SetColWidth. | |
| void | setColVisible (uint16_t minCol, uint16_t maxCol, bool visible) |
| Show/hide columns. excelize SetColVisible. | |
| void | setColOutlineLevel (uint16_t col, uint8_t level) |
| Column outline level 1–7. excelize SetColOutlineLevel. | |
| void | setColStyle (uint16_t minCol, uint16_t maxCol, XLStyleIndex style) |
| Apply a cell style index to an entire column range. excelize SetColStyle. | |
| void | setPanesXml (std::string panesXml) |
| Freeze/split panes XML fragment (sheetViews). Must be before first row. | |
| void | setPanes (const XLStreamPanesOptions &panes) |
| Structured freeze or split panes (must be before first row). excelize SetPanes. | |
| void | freezePanes (const std::string &topLeftCell) |
Freeze panes so that topLeftCell is the first unfrozen cell (e.g. "B2"). | |
| void | freezePanes (uint16_t cols, uint32_t rows) |
Freeze the first cols columns and rows rows. | |
| void | insertPageBreak (std::string_view cellRef) |
| Record a horizontal/vertical page break at a cell (stored until close). | |
| void | appendRow (const std::vector< XLCellValue > &values) |
| void | appendRow (const std::vector< XLCellValue > &values, const XLStreamRowOpts &opts) |
| void | appendRow (std::initializer_list< XLCellValue > values) |
| void | appendRow (std::initializer_list< XLCellValue > values, const XLStreamRowOpts &opts) |
| void | appendRow (const std::vector< XLStreamCell > &cells) |
| void | appendRow (const std::vector< XLStreamCell > &cells, const XLStreamRowOpts &opts) |
| void | appendRow (std::initializer_list< XLStreamCell > cells) |
| void | appendRow (std::initializer_list< XLStreamCell > cells, const XLStreamRowOpts &opts) |
| void | setRow (uint32_t row, uint16_t startCol, const std::vector< XLStreamCell > &cells, const XLStreamRowOpts &opts={}) |
| void | setRow (uint32_t row, uint16_t startCol, const std::vector< XLCellValue > &values, const XLStreamRowOpts &opts={}) |
| void | setRow (uint32_t row, uint16_t startCol, std::initializer_list< XLStreamCell > cells, const XLStreamRowOpts &opts={}) |
| void | setRow (uint32_t row, uint16_t startCol, std::initializer_list< XLCellValue > values, const XLStreamRowOpts &opts={}) |
| void | setRow (const std::string &cellRef, const std::vector< XLStreamCell > &cells, const XLStreamRowOpts &opts={}) |
| void | setRow (const std::string &cellRef, const std::vector< XLCellValue > &values, const XLStreamRowOpts &opts={}) |
| void | setRow (const std::string &cellRef, std::initializer_list< XLStreamCell > cells, const XLStreamRowOpts &opts={}) |
| void | setRow (const std::string &cellRef, std::initializer_list< XLCellValue > values, const XLStreamRowOpts &opts={}) |
| void | mergeCell (std::string_view topLeft, std::string_view bottomRight) |
| Merge a cell range (excelize MergeCell). Injected at close after sheetData. | |
| void | addTable (const XLStreamTableOptions &table) |
| Register one Excel table for this stream (excelize AddTable constraints). | |
| void | setAutoFilter (std::string_view range) |
| Sheet autoFilter range (e.g. "A1:D100"). Injected after sheetData on close. | |
| void | addHyperlink (std::string_view cellRef, std::string_view url, std::string_view tooltip={}) |
| External hyperlink (URL). Relationship + <hyperlinks> injected on close. | |
| void | addInternalHyperlink (std::string_view cellRef, std::string_view location, std::string_view tooltip={}) |
| Internal hyperlink (location like Sheet2!A1 or #'Sheet 2'!A1). | |
| void | close () |
| Flushes buffers, writes footer, patches dimension, deactivates stream. | |
| void | flush () |
| std::string | getTempFilePath () const |
| uint32_t | lastRow () const |
| uint16_t | maxColumn () const |
| uint64_t | bytesWritten () const |
| bool | hasDimensionSlot () const |
| const XLStreamWriteOptions & | options () const |
Friends | |
| class | XLWorksheet |
|
default |
|
delete |
|
noexcept |
| OpenXLSX::XLStreamWriter::~XLStreamWriter | ( | ) |
| void OpenXLSX::XLStreamWriter::addHyperlink | ( | std::string_view | cellRef, |
| std::string_view | url, | ||
| std::string_view | tooltip = {} ) |
External hyperlink (URL). Relationship + <hyperlinks> injected on close.
| void OpenXLSX::XLStreamWriter::addInternalHyperlink | ( | std::string_view | cellRef, |
| std::string_view | location, | ||
| std::string_view | tooltip = {} ) |
Internal hyperlink (location like Sheet2!A1 or #'Sheet 2'!A1).
| void OpenXLSX::XLStreamWriter::addTable | ( | const XLStreamTableOptions & | table | ) |
Register one Excel table for this stream (excelize AddTable constraints).
Call after rows, before close(). Creates table part + relationship on close.
| void OpenXLSX::XLStreamWriter::appendRow | ( | const std::vector< XLCellValue > & | values | ) |
| void OpenXLSX::XLStreamWriter::appendRow | ( | const std::vector< XLCellValue > & | values, |
| const XLStreamRowOpts & | opts ) |
| void OpenXLSX::XLStreamWriter::appendRow | ( | const std::vector< XLStreamCell > & | cells | ) |
| void OpenXLSX::XLStreamWriter::appendRow | ( | const std::vector< XLStreamCell > & | cells, |
| const XLStreamRowOpts & | opts ) |
| void OpenXLSX::XLStreamWriter::appendRow | ( | std::initializer_list< XLCellValue > | values | ) |
| void OpenXLSX::XLStreamWriter::appendRow | ( | std::initializer_list< XLCellValue > | values, |
| const XLStreamRowOpts & | opts ) |
| void OpenXLSX::XLStreamWriter::appendRow | ( | std::initializer_list< XLStreamCell > | cells | ) |
| void OpenXLSX::XLStreamWriter::appendRow | ( | std::initializer_list< XLStreamCell > | cells, |
| const XLStreamRowOpts & | opts ) |
|
inline |
Bytes committed to the sink (memory and/or temp file), excluding the active row buffer.
| void OpenXLSX::XLStreamWriter::close | ( | ) |
Flushes buffers, writes footer, patches dimension, deactivates stream.
|
inline |
| void OpenXLSX::XLStreamWriter::freezePanes | ( | const std::string & | topLeftCell | ) |
Freeze panes so that topLeftCell is the first unfrozen cell (e.g. "B2").
| void OpenXLSX::XLStreamWriter::freezePanes | ( | uint16_t | cols, |
| uint32_t | rows ) |
Freeze the first cols columns and rows rows.
| std::string OpenXLSX::XLStreamWriter::getTempFilePath | ( | ) | const |
|
inline |
True when dimension was installed as a fixed-width slot for O(1) patch.
| void OpenXLSX::XLStreamWriter::insertPageBreak | ( | std::string_view | cellRef | ) |
Record a horizontal/vertical page break at a cell (stored until close).
| bool OpenXLSX::XLStreamWriter::isStreamActive | ( | ) | const |
|
inline |
|
inline |
| void OpenXLSX::XLStreamWriter::mergeCell | ( | std::string_view | topLeft, |
| std::string_view | bottomRight ) |
Merge a cell range (excelize MergeCell). Injected at close after sheetData.
|
delete |
|
noexcept |
|
inline |
| void OpenXLSX::XLStreamWriter::setAutoFilter | ( | std::string_view | range | ) |
Sheet autoFilter range (e.g. "A1:D100"). Injected after sheetData on close.
| void OpenXLSX::XLStreamWriter::setColOutlineLevel | ( | uint16_t | col, |
| uint8_t | level ) |
Column outline level 1–7. excelize SetColOutlineLevel.
| void OpenXLSX::XLStreamWriter::setColStyle | ( | uint16_t | minCol, |
| uint16_t | maxCol, | ||
| XLStyleIndex | style ) |
Apply a cell style index to an entire column range. excelize SetColStyle.
| void OpenXLSX::XLStreamWriter::setColVisible | ( | uint16_t | minCol, |
| uint16_t | maxCol, | ||
| bool | visible ) |
Show/hide columns. excelize SetColVisible.
| void OpenXLSX::XLStreamWriter::setColWidth | ( | uint16_t | minCol, |
| uint16_t | maxCol, | ||
| double | width ) |
Set column width for [minCol, maxCol] (1-based, inclusive). excelize SetColWidth.
| void OpenXLSX::XLStreamWriter::setPanes | ( | const XLStreamPanesOptions & | panes | ) |
Structured freeze or split panes (must be before first row). excelize SetPanes.
| void OpenXLSX::XLStreamWriter::setPanesXml | ( | std::string | panesXml | ) |
Freeze/split panes XML fragment (sheetViews). Must be before first row.
| panesXml | Inner content or full <sheetViews>…</sheetViews> element. |
| void OpenXLSX::XLStreamWriter::setRow | ( | const std::string & | cellRef, |
| const std::vector< XLCellValue > & | values, | ||
| const XLStreamRowOpts & | opts = {} ) |
| void OpenXLSX::XLStreamWriter::setRow | ( | const std::string & | cellRef, |
| const std::vector< XLStreamCell > & | cells, | ||
| const XLStreamRowOpts & | opts = {} ) |
| void OpenXLSX::XLStreamWriter::setRow | ( | const std::string & | cellRef, |
| std::initializer_list< XLCellValue > | values, | ||
| const XLStreamRowOpts & | opts = {} ) |
| void OpenXLSX::XLStreamWriter::setRow | ( | const std::string & | cellRef, |
| std::initializer_list< XLStreamCell > | cells, | ||
| const XLStreamRowOpts & | opts = {} ) |
| void OpenXLSX::XLStreamWriter::setRow | ( | uint32_t | row, |
| uint16_t | startCol, | ||
| const std::vector< XLCellValue > & | values, | ||
| const XLStreamRowOpts & | opts = {} ) |
| void OpenXLSX::XLStreamWriter::setRow | ( | uint32_t | row, |
| uint16_t | startCol, | ||
| const std::vector< XLStreamCell > & | cells, | ||
| const XLStreamRowOpts & | opts = {} ) |
| void OpenXLSX::XLStreamWriter::setRow | ( | uint32_t | row, |
| uint16_t | startCol, | ||
| std::initializer_list< XLCellValue > | values, | ||
| const XLStreamRowOpts & | opts = {} ) |
| void OpenXLSX::XLStreamWriter::setRow | ( | uint32_t | row, |
| uint16_t | startCol, | ||
| std::initializer_list< XLStreamCell > | cells, | ||
| const XLStreamRowOpts & | opts = {} ) |
|
friend |