xlnt
|
A worksheet is a 2D array of cells starting with cell A1 in the top-left corner and extending indefinitely down and right as needed. More...
#include <worksheet.hpp>
Public Types | |
using | iterator = range_iterator |
Iterate over a non-const worksheet with an iterator of this type. More... | |
using | const_iterator = const_range_iterator |
Iterate over a non-const worksheet with an iterator of this type. More... | |
using | reverse_iterator = std::reverse_iterator< iterator > |
Iterate in reverse over a non-const worksheet with an iterator of this type. More... | |
using | const_reverse_iterator = std::reverse_iterator< const_iterator > |
Iterate in reverse order over a const worksheet with an iterator of this type. More... | |
Public Member Functions | |
worksheet () | |
Construct a null worksheet. No methods should be called on such a worksheet. More... | |
worksheet (const worksheet &rhs) | |
Copy constructor. This worksheet will point to the same memory as rhs's worksheet. More... | |
class workbook & | workbook () |
Returns a reference to the workbook this worksheet is owned by. More... | |
const class workbook & | workbook () const |
Returns a reference to the workbook this worksheet is owned by. More... | |
void | garbage_collect () |
Deletes data held in the worksheet that does not affect the internal data or display. For example, unreference styles and empty cells will be removed. More... | |
std::size_t | id () const |
Returns the unique numeric identifier of this worksheet. This will sometimes but not necessarily be the index of the worksheet in the workbook. More... | |
void | id (std::size_t id) |
Set the unique numeric identifier. The id defaults to the lowest unused id in the workbook so this should not be called without a good reason. More... | |
std::string | title () const |
Returns the title of this sheet. More... | |
void | title (const std::string &title) |
Sets the title of this sheet. More... | |
cell_reference | frozen_panes () const |
Returns the top left corner of the region above and to the left of which panes are frozen. More... | |
void | freeze_panes (cell top_left_cell) |
Freeze panes above and to the left of top_left_cell. More... | |
void | freeze_panes (const cell_reference &top_left_coordinate) |
Freeze panes above and to the left of top_left_coordinate. More... | |
void | unfreeze_panes () |
Remove frozen panes. The data in those panes will be unaffected–this affects only the view. More... | |
bool | has_frozen_panes () const |
Returns true if this sheet has a frozen row, frozen column, or both. More... | |
bool | has_cell (const cell_reference &reference) const |
Returns true if this sheet has an initialized cell at the given reference. More... | |
class cell | cell (const cell_reference &reference) |
Returns the cell at the given reference. If the cell doesn't exist, it will be initialized to null before being returned. More... | |
const class cell | cell (const cell_reference &reference) const |
Returns the cell at the given reference. If the cell doesn't exist, an invalid_parameter exception will be thrown. More... | |
class cell | cell (column_t column, row_t row) |
Returns the cell at the given column and row. If the cell doesn't exist, it will be initialized to null before being returned. More... | |
const class cell | cell (column_t column, row_t row) const |
Returns the cell at the given column and row. If the cell doesn't exist, an invalid_parameter exception will be thrown. More... | |
class range | range (const std::string &reference_string) |
Returns the range defined by reference string. If reference string is the name of a previously-defined named range in the sheet, it will be returned. More... | |
const class range | range (const std::string &reference_string) const |
Returns the range defined by reference string. If reference string is the name of a previously-defined named range in the sheet, it will be returned. More... | |
class range | range (const range_reference &reference) |
Returns the range defined by reference. More... | |
const class range | range (const range_reference &reference) const |
Returns the range defined by reference. More... | |
class range | rows (bool skip_null=true) |
Returns a range encompassing all cells in this sheet which will be iterated upon in row-major order. If skip_null is true (default), the range does not contain empty rows/columns at its boundaries and empty rows and cells will be skipped during iteration of the range. More... | |
const class range | rows (bool skip_null=true) const |
Returns a range encompassing all cells in this sheet which will be iterated upon in row-major order. If skip_null is true (default), the range does not contain empty rows/columns at its boundaries and empty rows and cells will be skipped during iteration of the range. More... | |
class range | columns (bool skip_null=true) |
Returns a range ecompassing all cells in this sheet which will be iterated upon in column-major order. If skip_null is true (default), the range does not contain empty rows/columns at its boundaries and empty columns and cells will be skipped during iteration of the range. More... | |
const class range | columns (bool skip_null=true) const |
Returns a range ecompassing all cells in this sheet which will be iterated upon in column-major order. If skip_null is true (default), the range does not contain empty rows/columns at its boundaries and empty columns and cells will be skipped during iteration of the range. More... | |
void | clear_cell (const cell_reference &ref) |
Clears memory used by the given cell. More... | |
void | clear_row (row_t row) |
Clears memory used by all cells in the given row. More... | |
void | insert_rows (row_t row, std::uint32_t amount) |
Insert empty rows before the given row index More... | |
void | insert_columns (column_t column, std::uint32_t amount) |
Insert empty columns before the given column index More... | |
void | delete_rows (row_t row, std::uint32_t amount) |
Delete rows before the given row index More... | |
void | delete_columns (column_t column, std::uint32_t amount) |
Delete columns before the given column index More... | |
xlnt::column_properties & | column_properties (column_t column) |
Returns the column properties for the given column. More... | |
const xlnt::column_properties & | column_properties (column_t column) const |
Returns the column properties for the given column. More... | |
bool | has_column_properties (column_t column) const |
Returns true if column properties have been set for the given column. More... | |
void | add_column_properties (column_t column, const class column_properties &props) |
Sets column properties for the given column to props. More... | |
double | column_width (column_t column) const |
Calculates the width of the given column. This will be the default column width if a custom width is not set on this column's column_properties. More... | |
xlnt::row_properties & | row_properties (row_t row) |
Returns the row properties for the given row. More... | |
const xlnt::row_properties & | row_properties (row_t row) const |
Returns the row properties for the given row. More... | |
bool | has_row_properties (row_t row) const |
Returns true if row properties have been set for the given row. More... | |
void | add_row_properties (row_t row, const class row_properties &props) |
Sets row properties for the given row to props. More... | |
double | row_height (row_t row) const |
Calculate the height of the given row. This will be the default row height if a custom height is not set on this row's row_properties. More... | |
cell_reference | point_pos (int left, int top) const |
Returns a reference to the cell at the given point coordinates. More... | |
void | create_named_range (const std::string &name, const std::string &reference_string) |
Creates a new named range with the given name encompassing the string representing a range. More... | |
void | create_named_range (const std::string &name, const range_reference &reference) |
Creates a new named range with the given name encompassing the given range reference. More... | |
bool | has_named_range (const std::string &name) const |
Returns true if this worksheet contains a named range with the given name. More... | |
class range | named_range (const std::string &name) |
Returns the named range with the given name. Throws key_not_found exception if the named range doesn't exist. More... | |
const class range | named_range (const std::string &name) const |
Returns the named range with the given name. Throws key_not_found exception if the named range doesn't exist. More... | |
void | remove_named_range (const std::string &name) |
Removes a named range with the given name. More... | |
row_t | lowest_row () const |
Returns the row of the first non-empty cell in the worksheet. More... | |
row_t | lowest_row_or_props () const |
Returns the row of the first non-empty cell or lowest row with properties in the worksheet. More... | |
row_t | highest_row () const |
Returns the row of the last non-empty cell in the worksheet. More... | |
row_t | highest_row_or_props () const |
Returns the row of the last non-empty cell or highest row with properties in the worksheet. More... | |
row_t | next_row () const |
Returns the row directly below the last non-empty cell in the worksheet. More... | |
column_t | lowest_column () const |
Returns the column of the first non-empty cell in the worksheet. More... | |
column_t | lowest_column_or_props () const |
Returns the column of the first non-empty cell or lowest column with properties in the worksheet. More... | |
column_t | highest_column () const |
Returns the column of the last non-empty cell in the worksheet. More... | |
column_t | highest_column_or_props () const |
Returns the column of the last non-empty cell or highest column with properties in the worksheet. More... | |
range_reference | calculate_dimension (bool skip_null=true, bool skip_row_props=false) const |
Returns a range_reference pointing to the full range of cells in the worksheet. If skip_null is true (default), empty cells (For example if the first row or column is empty) will not be included in upper left bound of range. If skip_row_props is false (default), rows with only properties being defined will be returned too. More... | |
void | merge_cells (const std::string &reference_string) |
Merges the cells within the range represented by the given string. More... | |
void | merge_cells (const range_reference &reference) |
Merges the cells within the given range. More... | |
void | unmerge_cells (const std::string &reference_string) |
Removes the merging of the cells in the range represented by the given string. More... | |
void | unmerge_cells (const range_reference &reference) |
Removes the merging of the cells in the given range. More... | |
std::vector< range_reference > | merged_ranges () const |
Returns a vector of references of all merged ranges in the worksheet. More... | |
bool | operator== (const worksheet &other) const |
Returns true if this worksheet refers to the same worksheet as other. More... | |
bool | operator!= (const worksheet &other) const |
Returns true if this worksheet doesn't refer to the same worksheet as other. More... | |
bool | operator== (std::nullptr_t) const |
Returns true if this worksheet is null. More... | |
bool | operator!= (std::nullptr_t) const |
Returns true if this worksheet is not null. More... | |
void | operator= (const worksheet &other) |
Sets the internal pointer of this worksheet object to point to other. More... | |
class cell | operator[] (const cell_reference &reference) |
Convenience method for worksheet::cell method. More... | |
const class cell | operator[] (const cell_reference &reference) const |
Convenience method for worksheet::cell method. More... | |
bool | compare (const worksheet &other, bool reference) const |
Returns true if this worksheet is equal to other. If reference is true, the comparison will only check that both worksheets point to the same sheet in the same workbook. More... | |
bool | has_page_setup () const |
Returns true if this worksheet has a page setup. More... | |
xlnt::page_setup | page_setup () const |
Returns the page setup for this sheet. More... | |
void | page_setup (const struct page_setup &setup) |
Sets the page setup for this sheet to setup. More... | |
bool | has_page_margins () const |
Returns true if this page has margins. More... | |
xlnt::page_margins | page_margins () const |
Returns the margins of this sheet. More... | |
void | page_margins (const class page_margins &margins) |
Sets the margins of this sheet to margins. More... | |
range_reference | auto_filter () const |
Returns the current auto-filter of this sheet. More... | |
void | auto_filter (const std::string &range_string) |
Sets the auto-filter of this sheet to the range defined by range_string. More... | |
void | auto_filter (const xlnt::range &range) |
Sets the auto-filter of this sheet to the given range. More... | |
void | auto_filter (const range_reference &reference) |
Sets the auto-filter of this sheet to the range defined by reference. More... | |
void | clear_auto_filter () |
Clear the auto-filter from this sheet. More... | |
bool | has_auto_filter () const |
Returns true if this sheet has an auto-filter set. More... | |
void | reserve (std::size_t n) |
Reserve n rows. This can be optionally called before adding many rows to improve performance. More... | |
bool | has_phonetic_properties () const |
Returns true if this sheet has phonetic properties More... | |
const phonetic_pr & | phonetic_properties () const |
Returns the phonetic properties of this sheet. More... | |
void | phonetic_properties (const phonetic_pr &phonetic_props) |
Sets the phonetic properties of this sheet to phonetic_props More... | |
bool | has_header_footer () const |
Returns true if this sheet has a header/footer. More... | |
class header_footer | header_footer () const |
Returns the header/footer of this sheet. More... | |
void | header_footer (const class header_footer &new_header_footer) |
Sets the header/footer of this sheet to new_header_footer. More... | |
xlnt::sheet_state | sheet_state () const |
Returns the sheet state of this sheet. More... | |
void | sheet_state (xlnt::sheet_state state) |
Sets the sheet state of this sheet. More... | |
iterator | begin () |
Returns an iterator to the first row in this sheet. More... | |
iterator | end () |
Returns an iterator one past the last row in this sheet. More... | |
const_iterator | begin () const |
Return a constant iterator to the first row in this sheet. More... | |
const_iterator | end () const |
Returns a constant iterator to one past the last row in this sheet. More... | |
const_iterator | cbegin () const |
Return a constant iterator to the first row in this sheet. More... | |
const_iterator | cend () const |
Returns a constant iterator to one past the last row in this sheet. More... | |
void | print_title_rows (row_t start, row_t end) |
Sets rows to repeat at top during printing. More... | |
optional< std::pair< row_t, row_t > > | print_title_rows () const |
Get rows to repeat at top during printing. More... | |
void | print_title_cols (column_t start, column_t end) |
Sets columns to repeat at left during printing. More... | |
optional< std::pair< column_t, column_t > > | print_title_cols () const |
Get columns to repeat at left during printing. More... | |
bool | has_print_titles () const |
Returns true if the sheet has print titles defined. More... | |
void | clear_print_titles () |
Remove all print titles. More... | |
void | print_area (const std::string &print_area) |
Sets the print area of this sheet to print_area. More... | |
void | clear_print_area () |
Clear the print area of this sheet. More... | |
range_reference | print_area () const |
Returns the print area defined for this sheet. More... | |
bool | has_print_area () const |
Returns true if the print area is defined for this sheet. More... | |
bool | has_view () const |
Returns true if this sheet has any number of views defined. More... | |
sheet_view & | view (std::size_t index=0) const |
Returns the view at the given index. More... | |
void | add_view (const sheet_view &new_view) |
Adds new_view to the set of available views for this sheet. More... | |
void | active_cell (const cell_reference &ref) |
Set the active cell on the default worksheet view to the given reference. More... | |
bool | has_active_cell () const |
Returns true if the worksheet has a view and the view has an active cell. More... | |
cell_reference | active_cell () const |
Returns the active cell on the default worksheet view. More... | |
void | clear_page_breaks () |
Remove all manual column and row page breaks (represented as dashed blue lines in the page view in Excel). More... | |
const std::vector< row_t > & | page_break_rows () const |
Returns vector where each element represents a row which will break a page below it. More... | |
void | page_break_at_row (row_t row) |
Add a page break at the given row. More... | |
const std::vector< column_t > & | page_break_columns () const |
Returns vector where each element represents a column which will break a page to the right. More... | |
void | page_break_at_column (column_t column) |
Add a page break at the given column. More... | |
xlnt::conditional_format | conditional_format (const range_reference &ref, const condition &when) |
Creates a conditional format for the given range with the given condition. More... | |
xlnt::path | path () const |
Returns the path of this worksheet in the containing package. More... | |
relationship | referring_relationship () const |
Returns the relationship from the parent workbook to this worksheet. More... | |
sheet_format_properties | format_properties () const |
Returns the current formatting properties. More... | |
void | format_properties (const sheet_format_properties &properties) |
Sets the format properties to the given properties. More... | |
bool | has_drawing () const |
Returns true if this worksheet has a page setup. More... | |
bool | is_empty () const |
Returns true if this worksheet is empty. A worksheet is considered empty if it doesn't have any cells. More... | |
Friends | |
class | cell |
class | const_range_iterator |
class | range_iterator |
class | workbook |
class | detail::xlsx_consumer |
class | detail::xlsx_producer |
A worksheet is a 2D array of cells starting with cell A1 in the top-left corner and extending indefinitely down and right as needed.
Iterate over a non-const worksheet with an iterator of this type.
using xlnt::worksheet::const_reverse_iterator = std::reverse_iterator<const_iterator> |
Iterate in reverse order over a const worksheet with an iterator of this type.
Iterate over a non-const worksheet with an iterator of this type.
using xlnt::worksheet::reverse_iterator = std::reverse_iterator<iterator> |
Iterate in reverse over a non-const worksheet with an iterator of this type.
xlnt::worksheet::worksheet | ( | ) |
Construct a null worksheet. No methods should be called on such a worksheet.
xlnt::worksheet::worksheet | ( | const worksheet & | rhs | ) |
Copy constructor. This worksheet will point to the same memory as rhs's worksheet.
void xlnt::worksheet::active_cell | ( | const cell_reference & | ref | ) |
Set the active cell on the default worksheet view to the given reference.
cell_reference xlnt::worksheet::active_cell | ( | ) | const |
Returns the active cell on the default worksheet view.
void xlnt::worksheet::add_column_properties | ( | column_t | column, |
const class column_properties & | props | ||
) |
Sets column properties for the given column to props.
void xlnt::worksheet::add_row_properties | ( | row_t | row, |
const class row_properties & | props | ||
) |
Sets row properties for the given row to props.
void xlnt::worksheet::add_view | ( | const sheet_view & | new_view | ) |
Adds new_view to the set of available views for this sheet.
range_reference xlnt::worksheet::auto_filter | ( | ) | const |
Returns the current auto-filter of this sheet.
void xlnt::worksheet::auto_filter | ( | const std::string & | range_string | ) |
Sets the auto-filter of this sheet to the range defined by range_string.
void xlnt::worksheet::auto_filter | ( | const xlnt::range & | range | ) |
Sets the auto-filter of this sheet to the given range.
void xlnt::worksheet::auto_filter | ( | const range_reference & | reference | ) |
Sets the auto-filter of this sheet to the range defined by reference.
iterator xlnt::worksheet::begin | ( | ) |
Returns an iterator to the first row in this sheet.
const_iterator xlnt::worksheet::begin | ( | ) | const |
Return a constant iterator to the first row in this sheet.
range_reference xlnt::worksheet::calculate_dimension | ( | bool | skip_null = true , |
bool | skip_row_props = false |
||
) | const |
Returns a range_reference pointing to the full range of cells in the worksheet. If skip_null is true (default), empty cells (For example if the first row or column is empty) will not be included in upper left bound of range. If skip_row_props is false (default), rows with only properties being defined will be returned too.
const_iterator xlnt::worksheet::cbegin | ( | ) | const |
Return a constant iterator to the first row in this sheet.
Returns the cell at the given column and row. If the cell doesn't exist, an invalid_parameter exception will be thrown.
Returns the cell at the given column and row. If the cell doesn't exist, it will be initialized to null before being returned.
class cell xlnt::worksheet::cell | ( | const cell_reference & | reference | ) |
Returns the cell at the given reference. If the cell doesn't exist, it will be initialized to null before being returned.
const class cell xlnt::worksheet::cell | ( | const cell_reference & | reference | ) | const |
Returns the cell at the given reference. If the cell doesn't exist, an invalid_parameter exception will be thrown.
const_iterator xlnt::worksheet::cend | ( | ) | const |
Returns a constant iterator to one past the last row in this sheet.
void xlnt::worksheet::clear_auto_filter | ( | ) |
Clear the auto-filter from this sheet.
void xlnt::worksheet::clear_cell | ( | const cell_reference & | ref | ) |
Clears memory used by the given cell.
void xlnt::worksheet::clear_page_breaks | ( | ) |
Remove all manual column and row page breaks (represented as dashed blue lines in the page view in Excel).
void xlnt::worksheet::clear_print_area | ( | ) |
Clear the print area of this sheet.
void xlnt::worksheet::clear_print_titles | ( | ) |
Remove all print titles.
void xlnt::worksheet::clear_row | ( | row_t | row | ) |
Clears memory used by all cells in the given row.
xlnt::column_properties& xlnt::worksheet::column_properties | ( | column_t | column | ) |
Returns the column properties for the given column.
const xlnt::column_properties& xlnt::worksheet::column_properties | ( | column_t | column | ) | const |
Returns the column properties for the given column.
double xlnt::worksheet::column_width | ( | column_t | column | ) | const |
Calculates the width of the given column. This will be the default column width if a custom width is not set on this column's column_properties.
const class range xlnt::worksheet::columns | ( | bool | skip_null = true | ) | const |
Returns a range ecompassing all cells in this sheet which will be iterated upon in column-major order. If skip_null is true (default), the range does not contain empty rows/columns at its boundaries and empty columns and cells will be skipped during iteration of the range.
class range xlnt::worksheet::columns | ( | bool | skip_null = true | ) |
Returns a range ecompassing all cells in this sheet which will be iterated upon in column-major order. If skip_null is true (default), the range does not contain empty rows/columns at its boundaries and empty columns and cells will be skipped during iteration of the range.
bool xlnt::worksheet::compare | ( | const worksheet & | other, |
bool | reference | ||
) | const |
Returns true if this worksheet is equal to other. If reference is true, the comparison will only check that both worksheets point to the same sheet in the same workbook.
xlnt::conditional_format xlnt::worksheet::conditional_format | ( | const range_reference & | ref, |
const condition & | when | ||
) |
Creates a conditional format for the given range with the given condition.
void xlnt::worksheet::create_named_range | ( | const std::string & | name, |
const std::string & | reference_string | ||
) |
Creates a new named range with the given name encompassing the string representing a range.
void xlnt::worksheet::create_named_range | ( | const std::string & | name, |
const range_reference & | reference | ||
) |
Creates a new named range with the given name encompassing the given range reference.
void xlnt::worksheet::delete_columns | ( | column_t | column, |
std::uint32_t | amount | ||
) |
Delete columns before the given column index
void xlnt::worksheet::delete_rows | ( | row_t | row, |
std::uint32_t | amount | ||
) |
Delete rows before the given row index
iterator xlnt::worksheet::end | ( | ) |
Returns an iterator one past the last row in this sheet.
const_iterator xlnt::worksheet::end | ( | ) | const |
Returns a constant iterator to one past the last row in this sheet.
sheet_format_properties xlnt::worksheet::format_properties | ( | ) | const |
Returns the current formatting properties.
void xlnt::worksheet::format_properties | ( | const sheet_format_properties & | properties | ) |
Sets the format properties to the given properties.
void xlnt::worksheet::freeze_panes | ( | cell | top_left_cell | ) |
Freeze panes above and to the left of top_left_cell.
void xlnt::worksheet::freeze_panes | ( | const cell_reference & | top_left_coordinate | ) |
Freeze panes above and to the left of top_left_coordinate.
cell_reference xlnt::worksheet::frozen_panes | ( | ) | const |
Returns the top left corner of the region above and to the left of which panes are frozen.
void xlnt::worksheet::garbage_collect | ( | ) |
Deletes data held in the worksheet that does not affect the internal data or display. For example, unreference styles and empty cells will be removed.
bool xlnt::worksheet::has_active_cell | ( | ) | const |
Returns true if the worksheet has a view and the view has an active cell.
bool xlnt::worksheet::has_auto_filter | ( | ) | const |
Returns true if this sheet has an auto-filter set.
bool xlnt::worksheet::has_cell | ( | const cell_reference & | reference | ) | const |
Returns true if this sheet has an initialized cell at the given reference.
bool xlnt::worksheet::has_column_properties | ( | column_t | column | ) | const |
Returns true if column properties have been set for the given column.
bool xlnt::worksheet::has_drawing | ( | ) | const |
Returns true if this worksheet has a page setup.
bool xlnt::worksheet::has_frozen_panes | ( | ) | const |
Returns true if this sheet has a frozen row, frozen column, or both.
bool xlnt::worksheet::has_header_footer | ( | ) | const |
Returns true if this sheet has a header/footer.
bool xlnt::worksheet::has_named_range | ( | const std::string & | name | ) | const |
Returns true if this worksheet contains a named range with the given name.
bool xlnt::worksheet::has_page_margins | ( | ) | const |
Returns true if this page has margins.
bool xlnt::worksheet::has_page_setup | ( | ) | const |
Returns true if this worksheet has a page setup.
bool xlnt::worksheet::has_phonetic_properties | ( | ) | const |
Returns true if this sheet has phonetic properties
bool xlnt::worksheet::has_print_area | ( | ) | const |
Returns true if the print area is defined for this sheet.
bool xlnt::worksheet::has_print_titles | ( | ) | const |
Returns true if the sheet has print titles defined.
bool xlnt::worksheet::has_row_properties | ( | row_t | row | ) | const |
Returns true if row properties have been set for the given row.
bool xlnt::worksheet::has_view | ( | ) | const |
Returns true if this sheet has any number of views defined.
class header_footer xlnt::worksheet::header_footer | ( | ) | const |
Returns the header/footer of this sheet.
void xlnt::worksheet::header_footer | ( | const class header_footer & | new_header_footer | ) |
Sets the header/footer of this sheet to new_header_footer.
column_t xlnt::worksheet::highest_column | ( | ) | const |
Returns the column of the last non-empty cell in the worksheet.
column_t xlnt::worksheet::highest_column_or_props | ( | ) | const |
Returns the column of the last non-empty cell or highest column with properties in the worksheet.
row_t xlnt::worksheet::highest_row | ( | ) | const |
Returns the row of the last non-empty cell in the worksheet.
row_t xlnt::worksheet::highest_row_or_props | ( | ) | const |
Returns the row of the last non-empty cell or highest row with properties in the worksheet.
std::size_t xlnt::worksheet::id | ( | ) | const |
Returns the unique numeric identifier of this worksheet. This will sometimes but not necessarily be the index of the worksheet in the workbook.
void xlnt::worksheet::id | ( | std::size_t | id | ) |
Set the unique numeric identifier. The id defaults to the lowest unused id in the workbook so this should not be called without a good reason.
void xlnt::worksheet::insert_columns | ( | column_t | column, |
std::uint32_t | amount | ||
) |
Insert empty columns before the given column index
void xlnt::worksheet::insert_rows | ( | row_t | row, |
std::uint32_t | amount | ||
) |
Insert empty rows before the given row index
bool xlnt::worksheet::is_empty | ( | ) | const |
Returns true if this worksheet is empty. A worksheet is considered empty if it doesn't have any cells.
column_t xlnt::worksheet::lowest_column | ( | ) | const |
Returns the column of the first non-empty cell in the worksheet.
column_t xlnt::worksheet::lowest_column_or_props | ( | ) | const |
Returns the column of the first non-empty cell or lowest column with properties in the worksheet.
row_t xlnt::worksheet::lowest_row | ( | ) | const |
Returns the row of the first non-empty cell in the worksheet.
row_t xlnt::worksheet::lowest_row_or_props | ( | ) | const |
Returns the row of the first non-empty cell or lowest row with properties in the worksheet.
void xlnt::worksheet::merge_cells | ( | const std::string & | reference_string | ) |
Merges the cells within the range represented by the given string.
void xlnt::worksheet::merge_cells | ( | const range_reference & | reference | ) |
Merges the cells within the given range.
std::vector<range_reference> xlnt::worksheet::merged_ranges | ( | ) | const |
Returns a vector of references of all merged ranges in the worksheet.
class range xlnt::worksheet::named_range | ( | const std::string & | name | ) |
Returns the named range with the given name. Throws key_not_found exception if the named range doesn't exist.
const class range xlnt::worksheet::named_range | ( | const std::string & | name | ) | const |
Returns the named range with the given name. Throws key_not_found exception if the named range doesn't exist.
row_t xlnt::worksheet::next_row | ( | ) | const |
Returns the row directly below the last non-empty cell in the worksheet.
bool xlnt::worksheet::operator!= | ( | const worksheet & | other | ) | const |
Returns true if this worksheet doesn't refer to the same worksheet as other.
bool xlnt::worksheet::operator!= | ( | std::nullptr_t | ) | const |
Returns true if this worksheet is not null.
void xlnt::worksheet::operator= | ( | const worksheet & | other | ) |
Sets the internal pointer of this worksheet object to point to other.
bool xlnt::worksheet::operator== | ( | const worksheet & | other | ) | const |
Returns true if this worksheet refers to the same worksheet as other.
bool xlnt::worksheet::operator== | ( | std::nullptr_t | ) | const |
Returns true if this worksheet is null.
class cell xlnt::worksheet::operator[] | ( | const cell_reference & | reference | ) |
Convenience method for worksheet::cell method.
const class cell xlnt::worksheet::operator[] | ( | const cell_reference & | reference | ) | const |
Convenience method for worksheet::cell method.
void xlnt::worksheet::page_break_at_column | ( | column_t | column | ) |
Add a page break at the given column.
void xlnt::worksheet::page_break_at_row | ( | row_t | row | ) |
Add a page break at the given row.
const std::vector<column_t>& xlnt::worksheet::page_break_columns | ( | ) | const |
Returns vector where each element represents a column which will break a page to the right.
const std::vector<row_t>& xlnt::worksheet::page_break_rows | ( | ) | const |
Returns vector where each element represents a row which will break a page below it.
xlnt::page_margins xlnt::worksheet::page_margins | ( | ) | const |
Returns the margins of this sheet.
void xlnt::worksheet::page_margins | ( | const class page_margins & | margins | ) |
Sets the margins of this sheet to margins.
xlnt::page_setup xlnt::worksheet::page_setup | ( | ) | const |
Returns the page setup for this sheet.
void xlnt::worksheet::page_setup | ( | const struct page_setup & | setup | ) |
Sets the page setup for this sheet to setup.
xlnt::path xlnt::worksheet::path | ( | ) | const |
Returns the path of this worksheet in the containing package.
const phonetic_pr& xlnt::worksheet::phonetic_properties | ( | ) | const |
Returns the phonetic properties of this sheet.
void xlnt::worksheet::phonetic_properties | ( | const phonetic_pr & | phonetic_props | ) |
Sets the phonetic properties of this sheet to phonetic_props
cell_reference xlnt::worksheet::point_pos | ( | int | left, |
int | top | ||
) | const |
Returns a reference to the cell at the given point coordinates.
void xlnt::worksheet::print_area | ( | const std::string & | print_area | ) |
Sets the print area of this sheet to print_area.
range_reference xlnt::worksheet::print_area | ( | ) | const |
Returns the print area defined for this sheet.
Sets columns to repeat at left during printing.
Get columns to repeat at left during printing.
Sets rows to repeat at top during printing.
Get rows to repeat at top during printing.
const class range xlnt::worksheet::range | ( | const range_reference & | reference | ) | const |
Returns the range defined by reference.
const class range xlnt::worksheet::range | ( | const std::string & | reference_string | ) | const |
Returns the range defined by reference string. If reference string is the name of a previously-defined named range in the sheet, it will be returned.
class range xlnt::worksheet::range | ( | const std::string & | reference_string | ) |
Returns the range defined by reference string. If reference string is the name of a previously-defined named range in the sheet, it will be returned.
class range xlnt::worksheet::range | ( | const range_reference & | reference | ) |
Returns the range defined by reference.
relationship xlnt::worksheet::referring_relationship | ( | ) | const |
Returns the relationship from the parent workbook to this worksheet.
void xlnt::worksheet::remove_named_range | ( | const std::string & | name | ) |
Removes a named range with the given name.
void xlnt::worksheet::reserve | ( | std::size_t | n | ) |
Reserve n rows. This can be optionally called before adding many rows to improve performance.
double xlnt::worksheet::row_height | ( | row_t | row | ) | const |
Calculate the height of the given row. This will be the default row height if a custom height is not set on this row's row_properties.
xlnt::row_properties& xlnt::worksheet::row_properties | ( | row_t | row | ) |
Returns the row properties for the given row.
const xlnt::row_properties& xlnt::worksheet::row_properties | ( | row_t | row | ) | const |
Returns the row properties for the given row.
const class range xlnt::worksheet::rows | ( | bool | skip_null = true | ) | const |
Returns a range encompassing all cells in this sheet which will be iterated upon in row-major order. If skip_null is true (default), the range does not contain empty rows/columns at its boundaries and empty rows and cells will be skipped during iteration of the range.
class range xlnt::worksheet::rows | ( | bool | skip_null = true | ) |
Returns a range encompassing all cells in this sheet which will be iterated upon in row-major order. If skip_null is true (default), the range does not contain empty rows/columns at its boundaries and empty rows and cells will be skipped during iteration of the range.
xlnt::sheet_state xlnt::worksheet::sheet_state | ( | ) | const |
Returns the sheet state of this sheet.
void xlnt::worksheet::sheet_state | ( | xlnt::sheet_state | state | ) |
Sets the sheet state of this sheet.
std::string xlnt::worksheet::title | ( | ) | const |
Returns the title of this sheet.
void xlnt::worksheet::title | ( | const std::string & | title | ) |
Sets the title of this sheet.
void xlnt::worksheet::unfreeze_panes | ( | ) |
Remove frozen panes. The data in those panes will be unaffected–this affects only the view.
void xlnt::worksheet::unmerge_cells | ( | const std::string & | reference_string | ) |
Removes the merging of the cells in the range represented by the given string.
void xlnt::worksheet::unmerge_cells | ( | const range_reference & | reference | ) |
Removes the merging of the cells in the given range.
sheet_view& xlnt::worksheet::view | ( | std::size_t | index = 0 | ) | const |
Returns the view at the given index.
class workbook& xlnt::worksheet::workbook | ( | ) |
Returns a reference to the workbook this worksheet is owned by.
const class workbook& xlnt::worksheet::workbook | ( | ) | const |
Returns a reference to the workbook this worksheet is owned by.