32 #include <xlnt/xlnt_config.hpp> 33 #include <xlnt/cell/index_types.hpp> 34 #include <xlnt/packaging/relationship.hpp> 35 #include <xlnt/worksheet/page_margins.hpp> 36 #include <xlnt/worksheet/page_setup.hpp> 37 #include <xlnt/worksheet/sheet_view.hpp> 44 class column_properties;
47 class conditional_format;
48 class const_range_iterator;
53 class range_reference;
56 class sheet_format_properties;
67 struct worksheet_impl;
122 void garbage_collect();
130 std::size_t id()
const;
136 void id(std::size_t
id);
141 std::string title()
const;
151 void title(
const std::string &title);
165 void freeze_panes(
cell top_left_cell);
175 void unfreeze_panes();
180 bool has_frozen_panes()
const;
227 const class
range range(const std::string &reference_string) const;
232 class
range range(const range_reference &reference);
237 const class
range range(const range_reference &reference) const;
245 class
range rows(bool skip_null = true);
253 const class
range rows(bool skip_null = true) const;
261 class
range columns(bool skip_null = true);
269 const class
range columns(bool skip_null = true) const;
280 void clear_cell(const cell_reference &ref);
285 void clear_row(row_t row);
292 void insert_rows(row_t row, std::uint32_t amount);
299 void insert_columns(column_t column, std::uint32_t amount);
306 void delete_rows(row_t row, std::uint32_t amount);
313 void delete_columns(column_t column, std::uint32_t amount);
334 bool has_column_properties(column_t column) const;
339 void add_column_properties(column_t column, const class column_properties &props);
345 double column_width(column_t column) const;
364 bool has_row_properties(row_t row) const;
369 void add_row_properties(row_t row, const class row_properties &props);
375 double row_height(row_t row) const;
389 void create_named_range(const std::string &name, const std::string &reference_string);
394 void create_named_range(const std::string &name, const range_reference &reference);
399 bool has_named_range(const std::string &name) const;
420 void remove_named_range(const std::string &name);
427 row_t lowest_row() const;
432 row_t lowest_row_or_props() const;
437 row_t highest_row() const;
442 row_t highest_row_or_props() const;
447 row_t next_row() const;
457 column_t lowest_column_or_props() const;
467 column_t highest_column_or_props() const;
475 range_reference calculate_dimension(bool skip_null=true, bool skip_row_props=false) const;
482 void merge_cells(const std::string &reference_string);
487 void merge_cells(const range_reference &reference);
494 void unmerge_cells(const std::string &reference_string);
501 void unmerge_cells(const range_reference &reference);
506 std::vector<range_reference> merged_ranges() const;
513 bool operator==(const worksheet &other) const;
518 bool operator!=(const worksheet &other) const;
523 bool operator==(std::nullptr_t) const;
528 bool operator!=(std::nullptr_t) const;
533 void operator=(const worksheet &other);
541 class
cell operator[](const cell_reference &reference);
549 const class
cell operator[](const cell_reference &reference) const;
556 bool compare(const worksheet &other, bool compare_by_reference) const;
563 bool has_page_setup() const;
575 void
page_setup(const struct page_setup &setup);
580 bool has_page_margins() const;
597 void clear_page_margins();
611 void auto_filter(const std::string &range_string);
616 void auto_filter(const xlnt::range &range);
621 void auto_filter(const range_reference &reference);
626 void clear_auto_filter();
631 bool has_auto_filter() const;
637 void reserve(std::size_t n);
642 bool has_phonetic_properties() const;
654 void phonetic_properties(const phonetic_pr &phonetic_props);
659 bool has_header_footer() const;
671 void
header_footer(const class header_footer &new_header_footer);
716 void print_title_rows(row_t start, row_t end);
721 optional<std::pair<row_t, row_t>> print_title_rows() const;
726 void print_title_cols(column_t start, column_t end);
731 optional<std::pair<column_t, column_t>> print_title_cols() const;
736 bool has_print_titles() const;
741 void clear_print_titles();
746 void print_area(const std::string &print_area);
751 void clear_print_area();
763 bool has_print_area() const;
768 bool has_view() const;
773 const std::vector<sheet_view> & views() const;
780 sheet_view &view(std::size_t index = 0) const;
785 void add_view(const sheet_view &new_view);
792 void remove_view(std::size_t index);
802 void active_cell(const cell_reference &ref);
807 bool has_active_cell() const;
822 void clear_page_breaks();
827 const std::vector<row_t> &page_break_rows() const;
832 void page_break_at_row(row_t row);
837 const std::vector<column_t> &page_break_columns() const;
842 void page_break_at_column(column_t column);
867 void format_properties(const sheet_format_properties &properties);
872 bool has_drawing() const;
878 bool is_empty() const;
883 int zoom_scale() const;
888 void zoom_scale(int scale);
898 void outline_settings(bool visible, bool symbols_below, bool symbols_right, bool apply_styles);
904 bool show_outline_symbols() const;
911 bool summary_below() const;
918 bool summary_right() const;
924 bool apply_styles() const;
931 friend class detail::xlsx_consumer;
932 friend class detail::xlsx_producer;
942 void register_comments_in_manifest();
947 void register_calc_chain_in_manifest();
952 void garbage_collect_formulae();
957 void parent(class workbook &wb);
964 void move_cells(std::uint32_t index, std::uint32_t amount, row_or_col_t row_or_col, bool reverse = false);
969 detail::worksheet_impl *d_ = nullptr;
A range is a 2D collection of cells with defined extens that can be iterated upon.
Definition: range.hpp:53
A const version of range_iterator which does not allow modification to the dereferenced cell_vector...
Definition: range_iterator.hpp:163
Represents an association between a source Package or part, and a target object which can be a part o...
Definition: relationship.hpp:103
std::uint32_t row_t
All rows should be referred to by an instance of this type. By default, row references range from 1 t...
Definition: index_types.hpp:43
Definition: cell_reference.hpp:288
Describes the margins around a worksheet for printing.
Definition: page_margins.hpp:35
Enumerates the possible types a cell can be determined by it's current value.
Definition: cell.hpp:36
The properties of a row in a worksheet.
Definition: row_properties.hpp:39
A worksheet is a 2D array of cells starting with cell A1 in the top-left corner and extending indefin...
Definition: worksheet.hpp:75
An object used to refer to a cell. References have two parts, the column and the row. In Excel, the reference string A1 refers to the top-left-most cell. A cell_reference can be initialized from a string of this form or a 1-indexed ordered pair of the form column, row. By default, cell references range from column A1–A1048576 (column A:A) to column XFD1–XFD1048576 (column XFD:XFD, column index 16384). The OOXML specification allows to extend this range, and XLNT allows both rows and columns between 1 and 4294967295. Please note that not all applications might support these extended ranges.
Definition: cell_reference.hpp:62
Describes a unit of data in a worksheet at a specific coordinate and its associated properties...
Definition: cell.hpp:83
sheet_state
Defines how a worksheet appears in the workbook. A workbook must have at least one sheet which is vis...
Definition: page_setup.hpp:82
Describes a view of a worksheet. Worksheets can have multiple views which show the data differently...
Definition: sheet_view.hpp:49
std::reverse_iterator< const_iterator > const_reverse_iterator
Iterate in reverse order over a const worksheet with an iterator of this type.
Definition: worksheet.hpp:96
value is an ISO 8601 formatted date
Encapsulates a path that points to location in a filesystem.
Definition: path.hpp:43
Many settings in xlnt are allowed to not have a value set. This class encapsulates a value which may ...
Definition: format.hpp:44
An iterator used by worksheet and range for traversing a 2D grid of cells by row/column then across t...
Definition: range_iterator.hpp:43
Columns can be referred to as a string A,B,...Z,AA,AB,..,ZZ,AAA,...,XFD or as a 1-indexed index (indi...
Definition: index_types.hpp:53
A 2D range of cells in a worksheet that is referred to by name. ws->range("A1:B2") could be replaced ...
Definition: named_range.hpp:42
Describes how a worksheet will be converted into a page during printing.
Definition: page_setup.hpp:92
Properties applied to a column in a worksheet. Columns can have a size and a style.
Definition: column_properties.hpp:40
std::reverse_iterator< iterator > reverse_iterator
Iterate in reverse over a non-const worksheet with an iterator of this type.
Definition: worksheet.hpp:91
A range_reference describes a rectangular area of a worksheet with positive width and height defined ...
Definition: range_reference.hpp:36
workbook is the container for all other parts of the document.
Definition: workbook.hpp:96
Phonetic properties Element provides a collection of properties that affect display of East Asian Lan...
Definition: phonetic_pr.hpp:39