OpenXLSX 1.12.1
Modern C++ Excel Library (Fork of OpenXLSX by Kenneth Troldal Balslev)
Loading...
Searching...
No Matches
XLWorksheet.hpp
Go to the documentation of this file.
1/*
2 * OpenXLSX-NX - Modern High-Performance C++ Excel Library
3 *
4 * Original work Copyright (c) 2018-2025, Kenneth Troldal Balslev and OpenXLSX contributors
5 * Modified work Copyright (c) 2026, Curry Tang and OpenXLSX-NX contributors
6 *
7 * Distributed under the BSD 3-Clause License.
8 * See LICENSE.md in the project root or https://opensource.org/licenses/BSD-3-Clause
9 */
10
11#include <optional>
12#include <memory>
13
14#ifndef OPENXLSX_XLWORKSHEET_HPP
15# define OPENXLSX_XLWORKSHEET_HPP
16
17# include "IXLCellProvider.hpp"
18# include "OpenXLSX-Exports.hpp"
19# include "XLConstants.hpp"
20# include "XLSheetBase.hpp"
21# include <string>
22# include <string_view>
23# include <vector>
24# include <gsl/span>
25
26# include "XLCell.hpp"
27# include "XLCellRange.hpp"
28# include "XLCellReference.hpp"
29# include "XLChart.hpp"
30# include "XLColumn.hpp"
32# include "XLPageSetup.hpp"
33# include "XLRow.hpp"
34# include "XLSparkline.hpp"
35# include "XLStreamReader.hpp"
36# include "XLStreamWriter.hpp"
37
38namespace OpenXLSX
39{
40 struct XLWorksheetImpl;
41 class XLComments;
43 class XLDrawing;
44 class XLVmlDrawing;
45 class XLMergeCells;
46 class XLPivotTable;
48 class XLSlicer;
49 struct XLSlicerOptions;
51 class XLRelationships;
54
55 const std::vector<std::string_view> XLWorksheetNodeOrder = { // worksheet XML root node required child sequence
56 "sheetPr",
57 "dimension",
58 "sheetViews",
59 "sheetFormatPr",
60 "cols",
61 "sheetData",
62 "sheetCalcPr",
63 "sheetProtection",
64 "protectedRanges",
65 "scenarios",
66 "autoFilter",
67 "sortState",
68 "dataConsolidate",
69 "customSheetViews",
70 "mergeCells",
71 "phoneticPr",
72 "conditionalFormatting",
73 "dataValidations",
74 "hyperlinks",
75 "printOptions",
76 "pageMargins",
77 "pageSetup",
78 "headerFooter",
79 "rowBreaks",
80 "colBreaks",
81 "customProperties",
82 "cellWatches",
83 "ignoredErrors",
84 "smartTags",
85 "drawing",
86 "legacyDrawing",
87 "legacyDrawingHF",
88 "drawingHF",
89 "picture",
90 "oleObjects",
91 "controls",
92 "webPublishItems",
93 "tableParts",
94 "pivotTables",
95 "extLst"};
96
97 const std::vector<std::string_view> XLSheetViewNodeOrder = { // worksheet XML <sheetView> child sequence
98 "pane",
99 "selection",
100 "pivotSelection",
101 "extLst"};
102
107 struct OPENXLSX_EXPORT XLSheetProtectionOptions {
108 bool sheet = true;
109 bool objects = false;
110 bool scenarios = false;
111
112 bool formatCells = false;
113 bool formatColumns = false;
114 bool formatRows = false;
115 bool insertColumns = false;
116 bool insertRows = false;
117 bool insertHyperlinks = false;
118 bool deleteColumns = false;
119 bool deleteRows = false;
120 bool sort = false;
121 bool autoFilter = false;
122 bool pivotTables = false;
123
124 bool selectLockedCells = true;
126 };
127
131 class OPENXLSX_EXPORT XLWorksheet final : public XLSheetBase<XLWorksheet>, public IXLCellProvider
132 {
133 friend class XLCell;
134 friend class XLRow;
135 friend class XLWorkbook;
136 friend class XLTableCollection;
137 friend class XLSlicerCollection;
138 friend class XLSheetBase<XLWorksheet>;
139 friend class XLRowDataProxy;
140
141 public:
142 XLWorksheet();
143 explicit XLWorksheet(XLXmlData* xmlData);
145 XLWorksheet(const XLWorksheet& other);
146 XLWorksheet(XLWorksheet&& other) noexcept;
147 XLWorksheet& operator=(const XLWorksheet& other);
149
150 // ===== IXLCellProvider Implementation ===== //
151 [[nodiscard]] XLCellValue getCellValue(uint32_t row, uint16_t col) const override;
152 [[nodiscard]] std::string getCellFormula(uint32_t row, uint16_t col) const override;
153 [[nodiscard]] bool hasCell(uint32_t row, uint16_t col) const override;
154 [[nodiscard]] std::string sheetName() const override;
155 void fetchRangeValues(const XLCellRange& range, std::vector<XLCellValue>& out) const override;
156
157 XLCellAssignable cell(const std::string& ref) const;
158 XLCellAssignable cell(const XLCellReference& ref) const;
159 XLCellAssignable cell(uint32_t rowNumber, uint16_t columnNumber) const;
160 XLCellAssignable cell(XLRowIndex row, XLColIndex col) const { return cell(row.val, col.val); }
161
166 XLStreamWriter streamWriter(bool useSharedStrings = false, size_t maxUniqueStrings = 100000);
167
171 XLStreamWriter streamWriter(const XLStreamWriteOptions& options);
172
178 XLStreamReader streamReader(const XLStreamReadOptions& options = {}) const;
179
180 XLCellAssignable findCell(const std::string& ref) const;
181 XLCellAssignable findCell(const XLCellReference& ref) const;
182 XLCellAssignable findCell(uint32_t rowNumber, uint16_t columnNumber) const;
183
184 std::optional<XLCell> peekCell(const std::string& ref) const;
185 std::optional<XLCell> peekCell(const XLCellReference& ref) const;
186 std::optional<XLCell> peekCell(uint32_t rowNumber, uint16_t columnNumber) const;
187 std::optional<XLCell> peekCell(XLRowIndex row, XLColIndex col) const { return peekCell(row.val, col.val); }
188
189 XLCellRange range() const;
190 XLCellRange range(const XLCellReference& topLeft, const XLCellReference& bottomRight) const;
191 XLCellRange range(std::string const& topLeft, std::string const& bottomRight) const;
192 XLCellRange range(std::string const& rangeReference) const;
193
194 XLRowRange rows() const;
195 XLRowRange rows(uint32_t rowCount) const;
196 XLRowRange rows(uint32_t firstRow, uint32_t lastRow) const;
197
198 XLRow row(uint32_t rowNumber) const;
199
204 void appendRow(const std::vector<XLCellValue>& values);
205
211 template<typename T,
212 typename = std::enable_if_t<!std::is_same_v<T, std::vector<XLCellValue>> &&
213 std::is_base_of_v<std::bidirectional_iterator_tag,
214 typename std::iterator_traits<typename T::iterator>::iterator_category>,
215 T>>
216 void appendRow(const T& values)
217 { row(rowCount() + 1).values() = values; }
218
219 XLColumn column(uint16_t columnNumber) const;
220 XLColumn column(std::string const& columnRef) const;
221
225 void autoFitColumn(uint16_t columnNumber);
226
227 void groupRows(uint32_t rowFirst, uint32_t rowLast, uint8_t outlineLevel = 1, bool collapsed = false);
228 void groupColumns(uint16_t colFirst, uint16_t colLast, uint8_t outlineLevel = 1, bool collapsed = false);
229
230 void setAutoFilter(const XLCellRange& range);
231 void clearAutoFilter();
232 bool hasAutoFilter() const;
233 std::string autoFilter() const;
234 XLAutoFilter autofilterObject() const;
235
242 void addSortCondition(const std::string& ref, uint16_t colId, bool descending = false);
243
249 void applyAutoFilter();
250
251 XLCellReference lastCell() const noexcept;
252 uint16_t columnCount() const noexcept;
253 uint32_t rowCount() const noexcept;
254
255 bool deleteRow(uint32_t rowNumber);
256
266 bool insertRow(uint32_t rowNumber, uint32_t count = 1);
267
276 bool deleteRow(uint32_t rowNumber, uint32_t count);
277
284 bool insertColumn(uint16_t colNumber, uint16_t count = 1);
285
292 bool deleteColumn(uint16_t colNumber, uint16_t count = 1);
293 void updateSheetName(const std::string& oldName, const std::string& newName);
294 void updateDimension();
295
300 void setStreamWriterOpen(bool open) noexcept;
301 void setStreamExtents(uint32_t lastRow, uint16_t maxCol) noexcept;
302 void setStreamMaterialization(std::string filePath, std::string memoryPayload) noexcept;
303 bool isStreamedSheet() const noexcept;
304
309 std::string registerStreamTable(const XLStreamTableOptions& table);
310
314 std::string registerStreamHyperlinks(const std::vector<XLStreamHyperlink>& links);
315
316 XLMergeCells& merges();
317 XLDataValidations& dataValidations();
318
319 XLCellRange mergeCells(XLCellRange const& rangeToMerge, bool emptyHiddenCells = false);
320 XLCellRange mergeCells(const std::string& rangeReference, bool emptyHiddenCells = false);
321 void unmergeCells(XLCellRange const& rangeToMerge);
322 void unmergeCells(const std::string& rangeReference);
323
324 XLStyleIndex getColumnFormat(uint16_t column) const;
325 XLStyleIndex getColumnFormat(const std::string& column) const;
326 bool setColumnFormat(uint16_t column, XLStyleIndex cellFormatIndex);
327 bool setColumnFormat(const std::string& column, XLStyleIndex cellFormatIndex);
328
329 XLStyleIndex getRowFormat(uint16_t row) const;
330 bool setRowFormat(uint32_t row, XLStyleIndex cellFormatIndex);
331
332 XLConditionalFormats conditionalFormats() const;
333 void addConditionalFormatting(const std::string& sqref, const XLCfRule& rule);
334 void addConditionalFormatting(const std::string& sqref, const XLCfRule& rule, const XLDxf& dxf);
335 void addConditionalFormatting(const XLCellRange& range, const XLCfRule& rule);
336 void addConditionalFormatting(const XLCellRange& range, const XLCfRule& rule, const XLDxf& dxf);
337
338 void removeConditionalFormatting(const std::string& sqref);
339 void removeConditionalFormatting(const XLCellRange& range);
340 void clearAllConditionalFormatting();
341
342 XLPageMargins pageMargins() const;
343 XLPrintOptions printOptions() const;
344 XLPageSetup pageSetup() const;
345 XLHeaderFooter headerFooter() const;
346
351 void setPrintArea(const std::string& sqref);
352
358 void setPrintTitleRows(uint32_t firstRow, uint32_t lastRow);
359
365 void setPrintTitleCols(uint16_t firstCol, uint16_t lastCol);
366
373 bool protect(const XLSheetProtectionOptions& options, std::string_view password = "");
374
375 bool protectSheet(bool set = true);
376 bool protectObjects(bool set = true);
377 bool protectScenarios(bool set = true);
378
379 bool allowInsertColumns(bool set = true);
380 bool allowInsertRows(bool set = true);
381 bool allowDeleteColumns(bool set = true);
382 bool allowDeleteRows(bool set = true);
383 bool allowFormatCells(bool set = true);
384 bool allowFormatColumns(bool set = true);
385 bool allowFormatRows(bool set = true);
386 bool allowInsertHyperlinks(bool set = true);
387 bool allowSort(bool set = true);
388 bool allowAutoFilter(bool set = true);
389 bool allowPivotTables(bool set = true);
390 bool allowSelectLockedCells(bool set = true);
391 bool allowSelectUnlockedCells(bool set = true);
392
393 bool denyInsertColumns() { return allowInsertColumns(false); }
394 bool denyInsertRows() { return allowInsertRows(false); }
395 bool denyDeleteColumns() { return allowDeleteColumns(false); }
396 bool denyDeleteRows() { return allowDeleteRows(false); }
397 bool denyFormatCells() { return allowFormatCells(false); }
398 bool denyFormatColumns() { return allowFormatColumns(false); }
399 bool denyFormatRows() { return allowFormatRows(false); }
401 bool denySort() { return allowSort(false); }
402 bool denyAutoFilter() { return allowAutoFilter(false); }
403 bool denyPivotTables() { return allowPivotTables(false); }
406
407 bool setPasswordHash(std::string hash);
408 bool setPassword(std::string password);
409 bool clearPassword();
410 bool clearSheetProtection();
411
412 bool sheetProtected() const;
413 bool objectsProtected() const;
414 bool scenariosProtected() const;
415
416 bool insertColumnsAllowed() const;
417 bool insertRowsAllowed() const;
418 bool deleteColumnsAllowed() const;
419 bool deleteRowsAllowed() const;
420 bool formatCellsAllowed() const;
421 bool formatColumnsAllowed() const;
422 bool formatRowsAllowed() const;
423 bool insertHyperlinksAllowed() const;
424 bool sortAllowed() const;
425 bool autoFilterAllowed() const;
426 bool pivotTablesAllowed() const;
427 bool selectLockedCellsAllowed() const;
428 bool selectUnlockedCellsAllowed() const;
429
430 std::string passwordHash() const;
431 bool passwordIsSet() const;
432 std::string sheetProtectionSummary() const;
433
440 void addSparkline(const std::string& location, const std::string& dataRange, XLSparklineType type = XLSparklineType::Line);
441
448 void addSparkline(const std::string& location, const std::string& dataRange, const XLSparklineOptions& options);
449
450 bool hasRelationships() const;
451 bool hasDrawing() const;
452 bool hasVmlDrawing() const;
453 bool hasComments() const;
454 bool hasThreadedComments() const;
455 bool hasTables() const;
456
457 XLDrawing& drawing();
458 void addImage(const std::string& name,
459 const std::string& data,
460 uint32_t row,
461 uint32_t col,
462 uint32_t width,
463 uint32_t height,
464 const XLImageOptions& options = XLImageOptions());
465 void addImage(const std::string& name,
466 gsl::span<const uint8_t> data,
467 uint32_t row,
468 uint32_t col,
469 uint32_t width,
470 uint32_t height,
471 const XLImageOptions& options = XLImageOptions());
472
478
479 void addShape(std::string_view cellReference, const XLVectorShapeOptions& options);
480
489 void addTableSlicer(std::string_view cellReference,
490 const XLTable& table,
491 std::string_view columnName,
492 const XLSlicerOptions& options = XLSlicerOptions());
493
502 void addPivotSlicer(std::string_view cellReference,
503 const XLPivotTable& pivotTable,
504 std::string_view columnName,
505 const XLSlicerOptions& options = XLSlicerOptions());
506
527 XLSlicerCollection& slicers();
528
533 void deleteSlicer(const std::string& name);
534
535 void insertImage(const std::string& cellReference, const std::string& imagePath);
536
543 void insertImage(const std::string& cellReference, const std::string& imagePath, const XLImageOptions& options);
544 void insertImage(const std::string& cellReference, gsl::span<const uint8_t> imageData, const XLImageOptions& options = XLImageOptions{});
545 void addScaledImage(const std::string& name, const std::string& data, uint32_t row, uint32_t col, double scalingFactor = 1.0);
546 std::vector<XLDrawingItem> images();
547
548 XLChart addChart(XLChartType type, std::string_view name, uint32_t row, uint32_t col, uint32_t width, uint32_t height);
549 XLChart addChart(XLChartType type, const XLChartAnchor& anchor);
550
555 std::vector<XLPivotTable> pivotTables();
556
562 XLPivotTable addPivotTable(const XLPivotTableOptions& options);
563
569 bool deletePivotTable(std::string_view name);
570
571 XLVmlDrawing& vmlDrawing();
572 XLComments& comments();
573 XLThreadedComments& threadedComments();
580 void addNote(std::string_view cellRef, std::string_view text, std::string_view author = "");
581
586 void deleteComment(std::string_view cellRef);
587
592 void deleteNote(std::string_view cellRef);
593
600 XLThreadedComment addComment(std::string_view cellRef, std::string_view text, std::string_view author = "");
601
608 XLThreadedComment addReply(const std::string& parentId, const std::string& text, const std::string& author = "");
609
610 XLTableCollection& tables();
611
612 void addHyperlink(std::string_view cellRef, std::string_view url, std::string_view tooltip = "");
613 void addInternalHyperlink(std::string_view cellRef, std::string_view location, std::string_view tooltip = "");
614 [[nodiscard]] bool hasHyperlink(std::string_view cellRef) const;
615 [[nodiscard]] std::string getHyperlink(std::string_view cellRef) const;
616 void removeHyperlink(std::string_view cellRef);
617
618 [[nodiscard]] bool hasPanes() const;
619 void freezePanes(uint16_t column, uint32_t row);
620
626 void freezePanes(const std::string& topLeftCell);
627
628 void splitPanes(double xSplit, double ySplit, std::string_view topLeftCell = "", XLPane activePane = XLPane::BottomRight);
629 void clearPanes();
630
631 void setZoom(uint16_t scale);
632 [[nodiscard]] uint16_t zoom() const;
633
634 void insertRowBreak(uint32_t row);
635 void insertColBreak(uint16_t col);
636 void removeRowBreak(uint32_t row);
637 void removeColBreak(uint16_t col);
638
639 void setSheetViewMode(std::string_view mode);
640 [[nodiscard]] std::string sheetViewMode() const;
641
642 void setShowGridLines(bool show);
643 [[nodiscard]] bool showGridLines() const;
644
645 void setShowRowColHeaders(bool show);
646 [[nodiscard]] bool showRowColHeaders() const;
647
648 void fitToPages(uint32_t fitToWidth, uint32_t fitToHeight);
649
650 [[nodiscard]] static std::string makeInternalLocation(std::string_view sheetName, std::string_view cellRef);
651
652 private:
653 uint16_t sheetXmlNumber() const;
654 XLRelationships& relationships();
655
656 XLColor getColor_impl() const;
657 void setColor_impl(const XLColor& color);
658 bool isSelected_impl() const;
659 void setSelected_impl(bool selected);
660 bool isActive_impl() const;
661 bool setActive_impl();
662
663 XMLNode prepareSheetViewForPanes();
664
665 // ── Row/Column structural shift helpers ──────────────────────────────
666 // Each helper updates one subsystem for a row or column shift.
667 // rowDelta / colDelta > 0 means insert (push out); < 0 means delete (pull in).
668 // fromRow / fromCol is the 1-based first affected coordinate.
669
672 [[nodiscard]] static std::string
673 shiftCellRef(std::string_view ref, int32_t rowDelta, int32_t colDelta, uint32_t fromRow, uint16_t fromCol);
674
676 [[nodiscard]] static std::string
677 shiftFormulaRefs(std::string_view formula, int32_t rowDelta, int32_t colDelta, uint32_t fromRow, uint16_t fromCol);
678
680 void shiftSheetDataRows(int32_t delta, uint32_t fromRow);
681
683 void shiftSheetDataCols(int32_t delta, uint16_t fromCol);
684
686 void shiftColsNode(int32_t delta, uint16_t fromCol);
687
689 void shiftFormulas(int32_t rowDelta, int32_t colDelta, uint32_t fromRow, uint16_t fromCol);
690
692 void shiftDrawingAnchors(int32_t rowDelta, int32_t colDelta, uint32_t fromRow, uint16_t fromCol);
693
695 void shiftDataValidations(int32_t rowDelta, int32_t colDelta, uint32_t fromRow, uint16_t fromCol);
696
698 void shiftAutoFilter(int32_t rowDelta, int32_t colDelta, uint32_t fromRow, uint16_t fromCol);
699
700 private:
701 std::unique_ptr<XLWorksheetImpl> m_impl;
702 inline static const std::vector<std::string_view>& m_nodeOrder = XLWorksheetNodeOrder;
703
704 // O(1) Hint Cache for cell node DOM traversal
705 mutable uint32_t m_hintRowNumber{0};
706 mutable XMLNode m_hintRowNode{};
707 mutable uint16_t m_hintColNumber{0};
708 mutable XMLNode m_hintCellNode{};
709
710 // O(1) Dimension Cache
711 mutable uint16_t m_maxColumn{0};
712 mutable bool m_dimensionDirty{true};
713 };
714} // namespace OpenXLSX
715
716#endif
Abstract immutable interface for accessing cell values and formulas across spreadsheet grids.
Definition IXLCellProvider.hpp:32
Definition XLAutoFilter.hpp:101
Definition XLCell.hpp:234
Represents a rectangular area of cells within a worksheet.
Definition XLCellRange.hpp:40
Definition XLCellReference.hpp:44
Class encapsulating a cell value.
Definition XLCellValue.hpp:89
Definition XLConditionalFormatting.hpp:277
Definition XLColumn.hpp:35
The XLComments class is the base class for worksheet comments.
Definition XLComments.hpp:98
Definition XLConditionalFormatting.hpp:407
Definition XLDataValidation.hpp:184
The XLDrawing class is the base class for worksheet drawings (images, charts, etc....
Definition XLDrawing.hpp:398
Definition XLStyles_Dxfs.hpp:36
A class representing the page setup of a worksheet.
Definition XLPageSetup.hpp:95
Manages merged cell ranges in a worksheet.
Definition XLMergeCells.hpp:48
A class representing the page margins of a worksheet.
Definition XLPageSetup.hpp:30
Definition XLPageSetup.hpp:135
Definition XLPivotTable.hpp:74
Definition XLPivotTable.hpp:368
A class representing the print options of a worksheet.
Definition XLPageSetup.hpp:67
Definition XLRelationships.hpp:150
Definition XLRow.hpp:416
The XLRow class represent a row in an Excel spreadsheet. Using XLRow objects, various row formatting ...
Definition XLRow.hpp:34
XLSheetBase()
Definition XLSheetBase.hpp:69
Definition XLSlicerCollection.hpp:114
Definition XLSlicer.hpp:58
Definition XLStreamReader.hpp:170
Definition XLStreamWriter.hpp:240
The XLTableCollection class manages multiple tables within a worksheet.
Definition XLTables.hpp:52
The XLTable class represents a single Excel table (.xml file).
Definition XLTables.hpp:117
A class encapsulating modern Excel threaded comments (ThreadedComments.xml).
Definition XLThreadedComments.hpp:66
The XLVmlDrawing class is the base class for worksheet comments.
Definition XLDrawing.hpp:523
XLRow row(uint32_t rowNumber) const
Definition XLWorksheet.cpp:235
bool denyInsertColumns()
Definition XLWorksheet.hpp:393
bool denyFormatCells()
Definition XLWorksheet.hpp:397
XLCellRange range() const
Definition XLWorksheet.cpp:188
bool hasCell(uint32_t row, uint16_t col) const override
Check if cell exists and is populated.
Definition XLWorksheet.cpp:617
bool denySelectLockedCells()
Definition XLWorksheet.hpp:404
std::optional< XLCell > peekCell(XLRowIndex row, XLColIndex col) const
Definition XLWorksheet.hpp:187
bool allowDeleteRows(bool set=true)
Definition XLWorksheet_Protection.cpp:158
bool denyFormatColumns()
Definition XLWorksheet.hpp:398
void appendRow(const T &values)
Append a new row with the given container of values.
Definition XLWorksheet.hpp:216
bool allowSelectLockedCells(bool set=true)
Definition XLWorksheet_Protection.cpp:216
bool allowSort(bool set=true)
Definition XLWorksheet_Protection.cpp:198
XLCellValue getCellValue(uint32_t row, uint16_t col) const override
Get cell value at 1-based (row, column).
Definition XLWorksheet.cpp:623
bool allowInsertColumns(bool set=true)
Definition XLWorksheet_Protection.cpp:130
friend class XLTableCollection
Definition XLWorksheet.hpp:136
std::string sheetName() const override
Get sheet name.
Definition XLWorksheet.cpp:637
bool allowFormatColumns(bool set=true)
Definition XLWorksheet_Protection.cpp:170
XLWorksheet()
Definition XLWorksheet.cpp:46
friend class XLWorkbook
Definition XLWorksheet.hpp:135
bool denyDeleteColumns()
Definition XLWorksheet.hpp:395
std::string getCellFormula(uint32_t row, uint16_t col) const override
Get formula string at 1-based (row, column), or empty string if no formula.
Definition XLWorksheet.cpp:630
XLCellAssignable cell(XLRowIndex row, XLColIndex col) const
Definition XLWorksheet.hpp:160
bool denySort()
Definition XLWorksheet.hpp:401
bool allowSelectUnlockedCells(bool set=true)
Definition XLWorksheet_Protection.cpp:227
bool allowDeleteColumns(bool set=true)
Definition XLWorksheet_Protection.cpp:147
void fetchRangeValues(const XLCellRange &range, std::vector< XLCellValue > &out) const override
Batch fetch values for a rectangular range into an output vector.
Definition XLWorksheet.cpp:642
bool denyAutoFilter()
Definition XLWorksheet.hpp:402
bool denyInsertRows()
Definition XLWorksheet.hpp:394
bool denyPivotTables()
Definition XLWorksheet.hpp:403
uint32_t rowCount() const noexcept
Definition XLWorksheet.cpp:474
friend class XLCell
Definition XLWorksheet.hpp:133
bool allowPivotTables(bool set=true)
Definition XLWorksheet_Protection.cpp:210
bool denySelectUnlockedCells()
Definition XLWorksheet.hpp:405
bool denyInsertHyperlinks()
Definition XLWorksheet.hpp:400
XLCellAssignable cell(const std::string &ref) const
Definition XLWorksheet.cpp:168
bool allowInsertRows(bool set=true)
Definition XLWorksheet_Protection.cpp:141
bool allowFormatRows(bool set=true)
Definition XLWorksheet_Protection.cpp:181
XLWorksheet & operator=(const XLWorksheet &other)
Definition XLWorksheet.cpp:111
bool denyFormatRows()
Definition XLWorksheet.hpp:399
bool allowFormatCells(bool set=true)
Definition XLWorksheet_Protection.cpp:164
bool denyDeleteRows()
Definition XLWorksheet.hpp:396
bool allowInsertHyperlinks(bool set=true)
Definition XLWorksheet_Protection.cpp:187
friend class XLSlicerCollection
Definition XLWorksheet.hpp:137
friend class XLRow
Definition XLWorksheet.hpp:134
friend class XLRowDataProxy
Definition XLWorksheet.hpp:139
bool allowAutoFilter(bool set=true)
Definition XLWorksheet_Protection.cpp:204
The XLXmlData class encapsulates the properties and behaviour of the .xml files in an ....
Definition XLXmlData.hpp:79
std::string xmlData(XLXmlSavingDeclaration savingDeclaration=XLXmlSavingDeclaration{}) const
Method for getting the XML data represented by the object.
Definition XLXmlFile.cpp:49
Definition IXLCellProvider.hpp:24
XLSparklineType
The XLSparklineType enum represents the type of a sparkline.
Definition XLSparkline.hpp:23
@ Line
Definition XLSparkline.hpp:23
const std::vector< std::string_view > XLWorksheetNodeOrder
Definition XLWorksheet.hpp:55
const std::vector< std::string_view > XLSheetViewNodeOrder
Definition XLWorksheet.hpp:97
OpenXLSX_xml_node XMLNode
Definition XLXmlParser.hpp:64
size_t XLStyleIndex
Definition XLStyles_Common.hpp:36
Definition XLCellIterator.hpp:131
Definition XLConstants.hpp:29
uint16_t val
Definition XLConstants.hpp:30
Options for inserting an image into a worksheet.
Definition XLImageOptions.hpp:33
Definition XLConstants.hpp:22
A structure defining all granular sheet protection options.
Definition XLWorksheet.hpp:107
bool scenarios
Definition XLWorksheet.hpp:110
bool formatRows
Definition XLWorksheet.hpp:114
bool selectLockedCells
Definition XLWorksheet.hpp:124
bool sort
Definition XLWorksheet.hpp:120
bool pivotTables
Definition XLWorksheet.hpp:122
bool deleteColumns
Definition XLWorksheet.hpp:118
bool formatColumns
Definition XLWorksheet.hpp:113
bool objects
Definition XLWorksheet.hpp:109
bool insertRows
Definition XLWorksheet.hpp:116
bool selectUnlockedCells
Definition XLWorksheet.hpp:125
bool deleteRows
Definition XLWorksheet.hpp:119
bool sheet
Definition XLWorksheet.hpp:108
bool formatCells
Definition XLWorksheet.hpp:112
bool insertColumns
Definition XLWorksheet.hpp:115
bool insertHyperlinks
Definition XLWorksheet.hpp:117
bool autoFilter
Definition XLWorksheet.hpp:121
Definition XLTables.hpp:35
The XLSparklineOptions struct encapsulates configuration for a sparkline group.
Definition XLSparkline.hpp:29
Options for XLStreamReader construction.
Definition XLStreamReader.hpp:72
Minimal table definition for streaming AddTable (excelize-compatible constraints).
Definition XLStreamWriter.hpp:136
Options for XLStreamWriter construction.
Definition XLStreamWriter.hpp:62
Definition XLDrawing.hpp:325
Definition XLWorksheetImpl.hpp:24