2017-01-19 21:37:40 +08:00
# API Reference
## Cell Module
### cell
2017-01-27 08:57:19 +08:00
#### ```using xlnt::cell::type = cell_typeundefined```
2017-01-19 21:37:40 +08:00
Alias xlnt::cell_type to xlnt::cell::type since it looks nicer.
2017-01-27 08:57:19 +08:00
#### ```friend class detail::xlsx_consumerundefined```
#### ```friend class detail::xlsx_producerundefined```
#### ```friend struct detail::cell_implundefined```
#### ```static const std::unordered_map<std::string, int>& xlnt::cell::error_codes()```
Returns a map of error strings such as #DIV/0 ! and their associated indices.
#### ```xlnt::cell::cell(const cell &)=default```
2017-01-19 21:37:40 +08:00
Default copy constructor.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::cell::has_value() const```
Returns true if value has been set and has not been cleared using cell::clear_value().
#### ```T xlnt::cell::value() const```
Returns the value of this cell as an instance of type T. Overloads exist for most C++ fundamental types like bool, int, etc. as well as for std::string and xlnt datetime types: date, time, datetime, and timedelta.
#### ```void xlnt::cell::clear_value()```
Makes this cell have a value of type null. All other cell attributes are retained.
2017-03-23 09:43:25 +08:00
#### ```void xlnt::cell::value(std::nullptr_t)```
Sets the type of this cell to null.
#### ```void xlnt::cell::value(bool boolean_value)```
Sets the value of this cell to the given boolean value.
#### ```void xlnt::cell::value(int int_value)```
Sets the value of this cell to the given value.
#### ```void xlnt::cell::value(unsigned int int_value)```
Sets the value of this cell to the given value.
#### ```void xlnt::cell::value(long long int int_value)```
Sets the value of this cell to the given value.
#### ```void xlnt::cell::value(unsigned long long int int_value)```
Sets the value of this cell to the given value.
#### ```void xlnt::cell::value(float float_value)```
Sets the value of this cell to the given value.
#### ```void xlnt::cell::value(double float_value)```
Sets the value of this cell to the given value.
#### ```void xlnt::cell::value(long double float_value)```
Sets the value of this cell to the given value.
#### ```void xlnt::cell::value(const date &date_value)```
Sets the value of this cell to the given value.
#### ```void xlnt::cell::value(const time &time_value)```
Sets the value of this cell to the given value.
#### ```void xlnt::cell::value(const datetime &datetime_value)```
Sets the value of this cell to the given value.
#### ```void xlnt::cell::value(const timedelta &timedelta_value)```
Sets the value of this cell to the given value.
#### ```void xlnt::cell::value(const std::string &string_value)```
Sets the value of this cell to the given value.
#### ```void xlnt::cell::value(const char *string_value)```
Sets the value of this cell to the given value.
#### ```void xlnt::cell::value(const rich_text &text_value)```
Sets the value of this cell to the given value.
#### ```void xlnt::cell::value(const cell other_cell)```
Sets the value and formatting of this cell to that of other_cell.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::cell::value(const std::string &string_value, bool infer_type)```
Analyzes string_value to determine its type, convert it to that type, and set the value of this cell to that converted value.
#### ```type xlnt::cell::data_type() const```
Returns the type of this cell.
#### ```void xlnt::cell::data_type(type t)```
Sets the type of this cell. This should usually be done indirectly by setting the value of the cell to a value of that type.
#### ```bool xlnt::cell::garbage_collectible() const```
There's no reason to keep a cell which has no value and is not a placeholder. Returns true if this cell has no value, style, isn't merged, etc.
#### ```bool xlnt::cell::is_date() const```
Returns true iff this cell's number format matches a date format.
#### ```cell_reference xlnt::cell::reference() const```
Returns a cell_reference that points to the location of this cell.
#### ```column_t xlnt::cell::column() const```
Returns the column of this cell.
#### ```row_t xlnt::cell::row() const```
Returns the row of this cell.
#### ```std::pair<int, int> xlnt::cell::anchor() const```
Returns the location of this cell as an ordered pair (left, top).
#### ```std::string xlnt::cell::hyperlink() const```
Returns the URL of this cell's hyperlink.
2017-03-23 09:43:25 +08:00
#### ```void xlnt::cell::hyperlink(const std::string &url)```
Adds a hyperlink to this cell pointing to the URL of the given value.
#### ```void xlnt::cell::hyperlink(const std::string &url, const std::string &display)```
Adds a hyperlink to this cell pointing to the URI of the given value and sets the text value of the cell to the given parameter.
#### ```void xlnt::cell::hyperlink(xlnt::cell target)```
Adds an internal hyperlink to this cell pointing to the given cell.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::cell::has_hyperlink() const```
Returns true if this cell has a hyperlink set.
#### ```class alignment xlnt::cell::computed_alignment() const```
Returns the alignment that should be used when displaying this cell graphically based on the workbook default, the cell-level format, and the named style applied to the cell in that order.
#### ```class border xlnt::cell::computed_border() const```
Returns the border that should be used when displaying this cell graphically based on the workbook default, the cell-level format, and the named style applied to the cell in that order.
#### ```class fill xlnt::cell::computed_fill() const```
Returns the fill that should be used when displaying this cell graphically based on the workbook default, the cell-level format, and the named style applied to the cell in that order.
#### ```class font xlnt::cell::computed_font() const```
Returns the font that should be used when displaying this cell graphically based on the workbook default, the cell-level format, and the named style applied to the cell in that order.
#### ```class number_format xlnt::cell::computed_number_format() const```
Returns the number format that should be used when displaying this cell graphically based on the workbook default, the cell-level format, and the named style applied to the cell in that order.
#### ```class protection xlnt::cell::computed_protection() const```
Returns the protection that should be used when displaying this cell graphically based on the workbook default, the cell-level format, and the named style applied to the cell in that order.
#### ```bool xlnt::cell::has_format() const```
Returns true if this cell has had a format applied to it.
#### ```const class format xlnt::cell::format() const```
Returns the format applied to this cell. If this cell has no format, an invalid_attribute exception will be thrown.
#### ```void xlnt::cell::format(const class format new_format)```
2017-01-19 21:37:40 +08:00
Applies the cell-level formatting of new_format to this cell.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::cell::clear_format()```
Removes the cell-level formatting from this cell. This doesn't affect the style that may also be applied to the cell. Throws an invalid_attribute exception if no format is applied.
#### ```class number_format xlnt::cell::number_format() const```
2017-01-19 21:37:40 +08:00
Returns the number format of this cell.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::cell::number_format(const class number_format &format)```
2017-01-19 21:37:40 +08:00
Creates a new format in the workbook, sets its number_format to the given format, and applies the format to this cell.
2017-01-27 08:57:19 +08:00
#### ```class font xlnt::cell::font() const```
2017-01-19 21:37:40 +08:00
Returns the font applied to the text in this cell.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::cell::font(const class font &font_)```
2017-01-19 21:37:40 +08:00
Creates a new format in the workbook, sets its font to the given font, and applies the format to this cell.
2017-01-27 08:57:19 +08:00
#### ```class fill xlnt::cell::fill() const```
2017-01-19 21:37:40 +08:00
Returns the fill applied to this cell.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::cell::fill(const class fill &fill_)```
2017-01-19 21:37:40 +08:00
Creates a new format in the workbook, sets its fill to the given fill, and applies the format to this cell.
2017-01-27 08:57:19 +08:00
#### ```class border xlnt::cell::border() const```
2017-01-19 21:37:40 +08:00
Returns the border of this cell.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::cell::border(const class border &border_)```
2017-01-19 21:37:40 +08:00
Creates a new format in the workbook, sets its border to the given border, and applies the format to this cell.
2017-01-27 08:57:19 +08:00
#### ```class alignment xlnt::cell::alignment() const```
2017-01-19 21:37:40 +08:00
Returns the alignment of the text in this cell.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::cell::alignment(const class alignment &alignment_)```
2017-01-19 21:37:40 +08:00
Creates a new format in the workbook, sets its alignment to the given alignment, and applies the format to this cell.
2017-01-27 08:57:19 +08:00
#### ```class protection xlnt::cell::protection() const```
2017-01-19 21:37:40 +08:00
Returns the protection of this cell.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::cell::protection(const class protection &protection_)```
2017-01-19 21:37:40 +08:00
Creates a new format in the workbook, sets its protection to the given protection, and applies the format to this cell.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::cell::has_style() const```
2017-01-19 21:37:40 +08:00
Returns true if this cell has had a style applied to it.
2017-01-27 08:57:19 +08:00
#### ```const class style xlnt::cell::style() const```
2017-01-19 21:37:40 +08:00
Returns a wrapper pointing to the named style applied to this cell.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::cell::style(const class style &new_style)```
Sets the named style applied to this cell to a style named style_name. Equivalent to style(new_style.name()).
#### ```void xlnt::cell::style(const std::string &style_name)```
2017-01-19 21:37:40 +08:00
Sets the named style applied to this cell to a style named style_name. If this style has not been previously created in the workbook, a key_not_found exception will be thrown.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::cell::clear_style()```
2017-01-19 21:37:40 +08:00
Removes the named style from this cell. An invalid_attribute exception will be thrown if this cell has no style. This will not affect the cell format of the cell.
2017-01-27 08:57:19 +08:00
#### ```std::string xlnt::cell::formula() const```
2017-01-19 21:37:40 +08:00
Returns the string representation of the formula applied to this cell.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::cell::formula(const std::string &formula)```
2017-01-19 21:37:40 +08:00
Sets the formula of this cell to the given value. This formula string should begin with '='.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::cell::clear_formula()```
2017-01-19 21:37:40 +08:00
Removes the formula from this cell. After this is called, has_formula() will return false.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::cell::has_formula() const```
2017-01-19 21:37:40 +08:00
Returns true if this cell has had a formula applied to it.
2017-01-27 08:57:19 +08:00
#### ```std::string xlnt::cell::to_string() const```
2017-01-19 21:37:40 +08:00
Returns a string representing the value of this cell. If the data type is not a string, it will be converted according to the number format.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::cell::is_merged() const```
Returns true iff this cell has been merged with one or more surrounding cells.
#### ```void xlnt::cell::merged(bool merged)```
Makes this a merged cell iff merged is true. Generally, this shouldn't be called directly. Instead, use worksheet::merge_cells on its parent worksheet.
#### ```std::string xlnt::cell::error() const```
Returns the error string that is stored in this cell.
#### ```void xlnt::cell::error(const std::string &error)```
Directly assigns the value of this cell to be the given error.
#### ```cell xlnt::cell::offset(int column, int row)```
Returns a cell from this cell's parent workbook at a relative offset given by the parameters.
#### ```class worksheet xlnt::cell::worksheet()```
Returns the worksheet that owns this cell.
#### ```const class worksheet xlnt::cell::worksheet() const```
Returns the worksheet that owns this cell.
#### ```class workbook& xlnt::cell::workbook()```
Returns the workbook of the worksheet that owns this cell.
#### ```const class workbook& xlnt::cell::workbook() const```
Returns the workbook of the worksheet that owns this cell.
#### ```calendar xlnt::cell::base_date() const```
Returns the base date of the parent workbook.
#### ```std::string xlnt::cell::check_string(const std::string &to_check)```
Returns to_check after verifying and fixing encoding, size, and illegal characters.
#### ```bool xlnt::cell::has_comment()```
Returns true if this cell has a comment applied.
#### ```void xlnt::cell::clear_comment()```
Deletes the comment applied to this cell if it exists.
#### ```class comment xlnt::cell::comment()```
Gets the comment applied to this cell.
#### ```void xlnt::cell::comment(const std::string &text, const std::string &author="Microsoft Office User")```
Creates a new comment with the given text and optional author and applies it to the cell.
#### ```void xlnt::cell::comment(const std::string &comment_text, const class font &comment_font, const std::string &author="Microsoft Office User")```
Creates a new comment with the given text, formatting, and optional author and applies it to the cell.
#### ```void xlnt::cell::comment(const class comment &new_comment)```
2017-01-19 21:37:40 +08:00
Apply the comment provided as the only argument to the cell.
2017-01-27 08:57:19 +08:00
#### ```double xlnt::cell::width() const```
Returns the width of this cell in pixels.
#### ```double xlnt::cell::height() const```
Returns the height of this cell in pixels.
#### ```cell& xlnt::cell::operator=(const cell &rhs)```
Makes this cell interally point to rhs. The cell data originally pointed to by this cell will be unchanged.
#### ```bool xlnt::cell::operator==(const cell &comparand) const```
Returns true if this cell the same cell as comparand (compared by reference).
#### ```bool xlnt::cell::operator==(std::nullptr_t) const```
Returns true if this cell is uninitialized.
2017-01-19 21:37:40 +08:00
### cell_reference_hash
2017-01-27 08:57:19 +08:00
#### ```std::size_t xlnt::cell_reference_hash::operator()(const cell_reference &k) const```
2017-01-19 21:37:40 +08:00
### cell_reference
2017-01-27 08:57:19 +08:00
#### ```static std::pair<std::string, row_t> xlnt::cell_reference::split_reference(const std::string &reference_string)```
2017-01-19 21:37:40 +08:00
Split a coordinate string like "A1" into an equivalent pair like {"A", 1}.
2017-01-27 08:57:19 +08:00
#### ```static std::pair<std::string, row_t> xlnt::cell_reference::split_reference(const std::string &reference_string, bool &absolute_column, bool &absolute_row)```
2017-01-19 21:37:40 +08:00
Split a coordinate string like "A1" into an equivalent pair like {"A", 1}. Reference parameters absolute_column and absolute_row will be set to true if column part or row part are prefixed by a dollar-sign indicating they are absolute, otherwise false.
2017-01-27 08:57:19 +08:00
#### ```xlnt::cell_reference::cell_reference()```
2017-01-19 21:37:40 +08:00
Default constructor makes a reference to the top-left-most cell, "A1".
2017-01-27 08:57:19 +08:00
#### ```xlnt::cell_reference::cell_reference(const char *reference_string)```
2017-01-19 21:37:40 +08:00
Constructs a cell_reference from a string reprenting a cell coordinate (e.g. $B14).
2017-01-27 08:57:19 +08:00
#### ```xlnt::cell_reference::cell_reference(const std::string &reference_string)```
2017-01-19 21:37:40 +08:00
Constructs a cell_reference from a string reprenting a cell coordinate (e.g. $B14).
2017-01-27 08:57:19 +08:00
#### ```xlnt::cell_reference::cell_reference(column_t column, row_t row)```
2017-01-19 21:37:40 +08:00
Constructs a cell_reference from a 1-indexed column index and row index.
2017-01-27 08:57:19 +08:00
#### ```cell_reference& xlnt::cell_reference::make_absolute(bool absolute_column=true, bool absolute_row=true)```
2017-01-19 21:37:40 +08:00
Convert a coordinate to an absolute coordinate string (e.g. B12 -> $B$12) Defaulting to true, absolute_column and absolute_row can optionally control whether the resulting cell_reference has an absolute column (e.g. B12 -> $B12) and absolute row (e.g. B12 -> B$12) respectively.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::cell_reference::column_absolute() const```
2017-01-19 21:37:40 +08:00
Return true if the reference refers to an absolute column, otherwise false.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::cell_reference::column_absolute(bool absolute_column)```
2017-01-19 21:37:40 +08:00
Make this reference have an absolute column if absolute_column is true, otherwise not absolute.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::cell_reference::row_absolute() const```
2017-01-19 21:37:40 +08:00
Return true if the reference refers to an absolute row, otherwise false.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::cell_reference::row_absolute(bool absolute_row)```
2017-01-19 21:37:40 +08:00
Make this reference have an absolute row if absolute_row is true, otherwise not absolute.
2017-01-27 08:57:19 +08:00
#### ```column_t xlnt::cell_reference::column() const```
2017-01-19 21:37:40 +08:00
Return a string that identifies the column of this reference (e.g. second column from left is "B")
2017-01-27 08:57:19 +08:00
#### ```void xlnt::cell_reference::column(const std::string &column_string)```
2017-01-19 21:37:40 +08:00
Set the column of this reference from a string that identifies a particular column.
2017-01-27 08:57:19 +08:00
#### ```column_t::index_t xlnt::cell_reference::column_index() const```
2017-01-19 21:37:40 +08:00
Return a 1-indexed numeric index of the column of this reference.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::cell_reference::column_index(column_t column)```
2017-01-19 21:37:40 +08:00
Set the column of this reference from a 1-indexed number that identifies a particular column.
2017-01-27 08:57:19 +08:00
#### ```row_t xlnt::cell_reference::row() const```
2017-01-19 21:37:40 +08:00
Return a 1-indexed numeric index of the row of this reference.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::cell_reference::row(row_t row)```
2017-01-19 21:37:40 +08:00
Set the row of this reference from a 1-indexed number that identifies a particular row.
2017-01-27 08:57:19 +08:00
#### ```cell_reference xlnt::cell_reference::make_offset(int column_offset, int row_offset) const```
2017-01-19 21:37:40 +08:00
Return a cell_reference offset from this cell_reference by the number of columns and rows specified by the parameters. A negative value for column_offset or row_offset results in a reference above or left of this cell_reference, respectively.
2017-01-27 08:57:19 +08:00
#### ```std::string xlnt::cell_reference::to_string() const```
2017-01-19 21:37:40 +08:00
Return a string like "A1" for cell_reference(1, 1).
2017-01-27 08:57:19 +08:00
#### ```range_reference xlnt::cell_reference::to_range() const```
2017-01-19 21:37:40 +08:00
Return a 1x1 range_reference containing only this cell_reference.
2017-01-27 08:57:19 +08:00
#### ```range_reference xlnt::cell_reference::operator,(const cell_reference &other) const```
2017-01-19 21:37:40 +08:00
I've always wanted to overload the comma operator. cell_reference("A", 1), cell_reference("B", 1) will return range_reference(cell_reference("A", 1), cell_reference("B", 1))
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::cell_reference::operator==(const cell_reference &comparand) const```
2017-01-19 21:37:40 +08:00
Return true if this reference is identical to comparand including in absoluteness of column and row.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::cell_reference::operator==(const std::string &reference_string) const```
2017-01-19 21:37:40 +08:00
Construct a cell_reference from reference_string and return the result of their comparison.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::cell_reference::operator==(const char *reference_string) const```
2017-01-19 21:37:40 +08:00
Construct a cell_reference from reference_string and return the result of their comparison.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::cell_reference::operator!=(const cell_reference &comparand) const```
2017-01-19 21:37:40 +08:00
Return true if this reference is not identical to comparand including in absoluteness of column and row.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::cell_reference::operator!=(const std::string &reference_string) const```
2017-01-19 21:37:40 +08:00
Construct a cell_reference from reference_string and return the result of their comparison.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::cell_reference::operator!=(const char *reference_string) const```
2017-01-19 21:37:40 +08:00
Construct a cell_reference from reference_string and return the result of their comparison.
### comment
2017-01-27 08:57:19 +08:00
#### ```xlnt::comment::comment()```
2017-01-19 21:37:40 +08:00
Constructs a new blank comment.
2017-01-27 08:57:19 +08:00
#### ```xlnt::comment::comment(const rich_text &text, const std::string &author)```
2017-01-19 21:37:40 +08:00
Constructs a new comment with the given text and author.
2017-01-27 08:57:19 +08:00
#### ```xlnt::comment::comment(const std::string &text, const std::string &author)```
2017-01-19 21:37:40 +08:00
Constructs a new comment with the given unformatted text and author.
2017-01-27 08:57:19 +08:00
#### ```rich_text xlnt::comment::text() const```
2017-01-19 21:37:40 +08:00
Return the text that will be displayed for this comment.
2017-01-27 08:57:19 +08:00
#### ```std::string xlnt::comment::plain_text() const```
2017-01-19 21:37:40 +08:00
Return the plain text that will be displayed for this comment without formatting information.
2017-01-27 08:57:19 +08:00
#### ```std::string xlnt::comment::author() const```
2017-01-19 21:37:40 +08:00
Return the author of this comment.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::comment::hide()```
2017-01-19 21:37:40 +08:00
Make this comment only visible when the associated cell is hovered.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::comment::show()```
2017-01-19 21:37:40 +08:00
Make this comment always visible.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::comment::visible() const```
2017-01-19 21:37:40 +08:00
Returns true if this comment is not hidden.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::comment::position(int left, int top)```
2017-01-19 21:37:40 +08:00
Set the absolute position of this cell to the given coordinates.
2017-01-27 08:57:19 +08:00
#### ```int xlnt::comment::left() const```
2017-01-19 21:37:40 +08:00
Returns the distance from the left side of the sheet to the left side of the comment.
2017-01-27 08:57:19 +08:00
#### ```int xlnt::comment::top() const```
2017-01-19 21:37:40 +08:00
Returns the distance from the top of the sheet to the top of the comment.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::comment::size(int width, int height)```
2017-01-19 21:37:40 +08:00
Set the size of the comment.
2017-01-27 08:57:19 +08:00
#### ```int xlnt::comment::width() const```
2017-01-19 21:37:40 +08:00
Returns the width of this comment.
2017-01-27 08:57:19 +08:00
#### ```int xlnt::comment::height() const```
2017-01-19 21:37:40 +08:00
Returns the height of this comment.
2017-01-27 08:57:19 +08:00
#### ```bool operator==(const comment &left, const comment &right)```
2017-01-19 21:37:40 +08:00
Return true if both comments are equivalent.
### column_t
2017-01-27 08:57:19 +08:00
#### ```using xlnt::column_t::index_t = std::uint32_tundefined```
#### ```index_t xlnt::column_t::indexundefined```
2017-01-19 21:37:40 +08:00
Internal numeric value of this column index.
2017-01-27 08:57:19 +08:00
#### ```static index_t xlnt::column_t::column_index_from_string(const std::string &column_string)```
2017-01-19 21:37:40 +08:00
Convert a column letter into a column number (e.g. B -> 2)
2017-01-27 08:57:19 +08:00
#### ```static std::string xlnt::column_t::column_string_from_index(index_t column_index)```
2017-01-19 21:37:40 +08:00
Convert a column number into a column letter (3 -> 'C')
2017-01-27 08:57:19 +08:00
#### ```xlnt::column_t::column_t()```
2017-01-19 21:37:40 +08:00
Default column_t is the first (left-most) column.
2017-01-27 08:57:19 +08:00
#### ```xlnt::column_t::column_t(index_t column_index)```
2017-01-19 21:37:40 +08:00
Construct a column from a number.
2017-01-27 08:57:19 +08:00
#### ```xlnt::column_t::column_t(const std::string &column_string)```
2017-01-19 21:37:40 +08:00
Construct a column from a string.
2017-01-27 08:57:19 +08:00
#### ```xlnt::column_t::column_t(const char *column_string)```
2017-01-19 21:37:40 +08:00
Construct a column from a string.
2017-01-27 08:57:19 +08:00
#### ```xlnt::column_t::column_t(const column_t &other)```
2017-01-19 21:37:40 +08:00
Copy constructor
2017-01-27 08:57:19 +08:00
#### ```xlnt::column_t::column_t(column_t &&other)```
2017-01-19 21:37:40 +08:00
Move constructor
2017-01-27 08:57:19 +08:00
#### ```std::string xlnt::column_t::column_string() const```
2017-01-19 21:37:40 +08:00
Return a string representation of this column index.
2017-01-27 08:57:19 +08:00
#### ```column_t& xlnt::column_t::operator=(column_t rhs)```
2017-01-19 21:37:40 +08:00
Set this column to be the same as rhs's and return reference to self.
2017-01-27 08:57:19 +08:00
#### ```column_t& xlnt::column_t::operator=(const std::string &rhs)```
2017-01-19 21:37:40 +08:00
Set this column to be equal to rhs and return reference to self.
2017-01-27 08:57:19 +08:00
#### ```column_t& xlnt::column_t::operator=(const char *rhs)```
2017-01-19 21:37:40 +08:00
Set this column to be equal to rhs and return reference to self.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::column_t::operator==(const column_t &other) const```
2017-01-19 21:37:40 +08:00
Return true if this column refers to the same column as other.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::column_t::operator!=(const column_t &other) const```
2017-01-19 21:37:40 +08:00
Return true if this column doesn't refer to the same column as other.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::column_t::operator==(int other) const```
2017-01-19 21:37:40 +08:00
Return true if this column refers to the same column as other.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::column_t::operator==(index_t other) const```
2017-01-19 21:37:40 +08:00
Return true if this column refers to the same column as other.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::column_t::operator==(const std::string &other) const```
2017-01-19 21:37:40 +08:00
Return true if this column refers to the same column as other.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::column_t::operator==(const char *other) const```
2017-01-19 21:37:40 +08:00
Return true if this column refers to the same column as other.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::column_t::operator!=(int other) const```
2017-01-19 21:37:40 +08:00
Return true if this column doesn't refer to the same column as other.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::column_t::operator!=(index_t other) const```
2017-01-19 21:37:40 +08:00
Return true if this column doesn't refer to the same column as other.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::column_t::operator!=(const std::string &other) const```
2017-01-19 21:37:40 +08:00
Return true if this column doesn't refer to the same column as other.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::column_t::operator!=(const char *other) const```
2017-01-19 21:37:40 +08:00
Return true if this column doesn't refer to the same column as other.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::column_t::operator>(const column_t &other) const```
2017-01-19 21:37:40 +08:00
Return true if other is to the right of this column.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::column_t::operator>=(const column_t &other) const```
2017-01-19 21:37:40 +08:00
Return true if other is to the right of or equal to this column.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::column_t::operator<(const column_t &other) const```
2017-01-19 21:37:40 +08:00
Return true if other is to the left of this column.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::column_t::operator<=(const column_t &other) const```
2017-01-19 21:37:40 +08:00
Return true if other is to the left of or equal to this column.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::column_t::operator>(const column_t::index_t &other) const```
2017-01-19 21:37:40 +08:00
Return true if other is to the right of this column.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::column_t::operator>=(const column_t::index_t &other) const```
2017-01-19 21:37:40 +08:00
Return true if other is to the right of or equal to this column.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::column_t::operator<(const column_t::index_t &other) const```
2017-01-19 21:37:40 +08:00
Return true if other is to the left of this column.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::column_t::operator<=(const column_t::index_t &other) const```
2017-01-19 21:37:40 +08:00
Return true if other is to the left of or equal to this column.
2017-01-27 08:57:19 +08:00
#### ```column_t& xlnt::column_t::operator++()```
2017-01-19 21:37:40 +08:00
Pre-increment this column, making it point to the column one to the right.
2017-01-27 08:57:19 +08:00
#### ```column_t& xlnt::column_t::operator--()```
2017-01-19 21:37:40 +08:00
Pre-deccrement this column, making it point to the column one to the left.
2017-01-27 08:57:19 +08:00
#### ```column_t xlnt::column_t::operator++(int)```
2017-01-19 21:37:40 +08:00
Post-increment this column, making it point to the column one to the right and returning the old column.
2017-01-27 08:57:19 +08:00
#### ```column_t xlnt::column_t::operator--(int)```
2017-01-19 21:37:40 +08:00
Post-decrement this column, making it point to the column one to the left and returning the old column.
2017-01-27 08:57:19 +08:00
#### ```column_t& xlnt::column_t::operator+=(const column_t &rhs)```
2017-01-19 21:37:40 +08:00
Add rhs to this column and return a reference to this column.
2017-01-27 08:57:19 +08:00
#### ```column_t& xlnt::column_t::operator-=(const column_t &rhs)```
2017-01-19 21:37:40 +08:00
Subtrac rhs from this column and return a reference to this column.
2017-01-27 08:57:19 +08:00
#### ```column_t& xlnt::column_t::operator*=(const column_t &rhs)```
2017-01-19 21:37:40 +08:00
Multiply this column by rhs and return a reference to this column.
2017-01-27 08:57:19 +08:00
#### ```column_t& xlnt::column_t::operator/=(const column_t &rhs)```
2017-01-19 21:37:40 +08:00
Divide this column by rhs and return a reference to this column.
2017-01-27 08:57:19 +08:00
#### ```column_t& xlnt::column_t::operator%=(const column_t &rhs)```
2017-01-19 21:37:40 +08:00
Mod this column by rhs and return a reference to this column.
2017-01-27 08:57:19 +08:00
#### ```column_t operator+(column_t lhs, const column_t &rhs)```
2017-01-19 21:37:40 +08:00
Return the result of adding rhs to this column.
2017-01-27 08:57:19 +08:00
#### ```column_t operator-(column_t lhs, const column_t &rhs)```
2017-01-19 21:37:40 +08:00
Return the result of subtracing lhs by rhs column.
2017-01-27 08:57:19 +08:00
#### ```column_t operator*(column_t lhs, const column_t &rhs)```
2017-01-19 21:37:40 +08:00
Return the result of multiply lhs by rhs column.
2017-01-27 08:57:19 +08:00
#### ```column_t operator/(column_t lhs, const column_t &rhs)```
2017-01-19 21:37:40 +08:00
Return the result of divide lhs by rhs column.
2017-01-27 08:57:19 +08:00
#### ```column_t operator%(column_t lhs, const column_t &rhs)```
2017-01-19 21:37:40 +08:00
Return the result of mod lhs by rhs column.
2017-01-27 08:57:19 +08:00
#### ```bool operator>(const column_t::index_t &left, const column_t &right)```
2017-01-19 21:37:40 +08:00
Return true if other is to the right of this column.
2017-01-27 08:57:19 +08:00
#### ```bool operator>=(const column_t::index_t &left, const column_t &right)```
2017-01-19 21:37:40 +08:00
Return true if other is to the right of or equal to this column.
2017-01-27 08:57:19 +08:00
#### ```bool operator<(const column_t::index_t &left, const column_t &right)```
2017-01-19 21:37:40 +08:00
Return true if other is to the left of this column.
2017-01-27 08:57:19 +08:00
#### ```bool operator<=(const column_t::index_t &left, const column_t &right)```
2017-01-19 21:37:40 +08:00
Return true if other is to the left of or equal to this column.
2017-01-27 08:57:19 +08:00
#### ```void swap(column_t &left, column_t &right)```
2017-01-19 21:37:40 +08:00
Swap the columns that left and right refer to.
### column_hash
2017-01-27 08:57:19 +08:00
#### ```std::size_t xlnt::column_hash::operator()(const column_t &k) const```
2017-01-19 21:37:40 +08:00
### column_t >
2017-01-27 08:57:19 +08:00
#### ```size_t std::hash< xlnt::column_t >::operator()(const xlnt::column_t &k) const```
2017-01-19 21:37:40 +08:00
### rich_text
2017-01-27 08:57:19 +08:00
#### ```xlnt::rich_text::rich_text()=default```
#### ```xlnt::rich_text::rich_text(const std::string &plain_text)```
#### ```xlnt::rich_text::rich_text(const std::string &plain_text, const class font &text_font)```
#### ```xlnt::rich_text::rich_text(const rich_text_run &single_run)```
#### ```void xlnt::rich_text::clear()```
2017-01-19 21:37:40 +08:00
Remove all text runs from this text.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::rich_text::plain_text(const std::string &s)```
2017-01-19 21:37:40 +08:00
Clear any runs in this text and add a single run with default formatting and the given string as its textual content.
2017-01-27 08:57:19 +08:00
#### ```std::string xlnt::rich_text::plain_text() const```
2017-01-19 21:37:40 +08:00
Combine the textual content of each text run in order and return the result.
2017-01-27 08:57:19 +08:00
#### ```std::vector<rich_text_run> xlnt::rich_text::runs() const```
2017-01-19 21:37:40 +08:00
Returns a copy of the individual runs that comprise this text.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::rich_text::runs(const std::vector< rich_text_run > &new_runs)```
2017-01-19 21:37:40 +08:00
Set the runs of this text all at once.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::rich_text::add_run(const rich_text_run &t)```
2017-01-19 21:37:40 +08:00
Add a new run to the end of the set of runs.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::rich_text::operator==(const rich_text &rhs) const```
2017-01-19 21:37:40 +08:00
Returns true if the runs that make up this text are identical to those in rhs.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::rich_text::operator==(const std::string &rhs) const```
2017-01-19 21:37:40 +08:00
Returns true if this text has a single unformatted run with text equal to rhs.
## Packaging Module
### manifest
2017-01-27 08:57:19 +08:00
#### ```void xlnt::manifest::clear()```
2017-01-19 21:37:40 +08:00
Unregisters all default and override type and all relationships and known parts.
2017-01-27 08:57:19 +08:00
#### ```std::vector<path> xlnt::manifest::parts() const```
2017-01-19 21:37:40 +08:00
Returns the path to all internal package parts registered as a source or target of a relationship.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::manifest::has_relationship(const path &source, relationship_type type) const```
2017-01-19 21:37:40 +08:00
Returns true if the manifest contains a relationship with the given type with part as the source.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::manifest::has_relationship(const path &source, const std::string &rel_id) const```
2017-01-19 21:37:40 +08:00
Returns true if the manifest contains a relationship with the given type with part as the source.
2017-01-27 08:57:19 +08:00
#### ```class relationship xlnt::manifest::relationship(const path &source, relationship_type type) const```
2017-01-19 21:37:40 +08:00
Returns the relationship with "source" as the source and with a type of "type". Throws a key_not_found exception if no such relationship is found.
2017-01-27 08:57:19 +08:00
#### ```class relationship xlnt::manifest::relationship(const path &source, const std::string &rel_id) const```
2017-01-19 21:37:40 +08:00
Returns the relationship with "source" as the source and with an ID of "rel_id". Throws a key_not_found exception if no such relationship is found.
2017-01-27 08:57:19 +08:00
#### ```std::vector<xlnt::relationship> xlnt::manifest::relationships(const path &source) const```
2017-01-19 21:37:40 +08:00
Returns all relationship with "source" as the source.
2017-01-27 08:57:19 +08:00
#### ```std::vector<xlnt::relationship> xlnt::manifest::relationships(const path &source, relationship_type type) const```
2017-01-19 21:37:40 +08:00
Returns all relationships with "source" as the source and with a type of "type".
2017-01-27 08:57:19 +08:00
#### ```path xlnt::manifest::canonicalize(const std::vector< xlnt::relationship > &rels) const```
2017-01-19 21:37:40 +08:00
Returns the canonical path of the chain of relationships by traversing through rels and forming the absolute combined path.
2017-01-27 08:57:19 +08:00
#### ```std::string xlnt::manifest::register_relationship(const uri &source, relationship_type type, const uri &target, target_mode mode)```
2017-03-23 09:43:25 +08:00
Registers a new relationship by specifying all of the relationship properties explicitly.
2017-01-27 08:57:19 +08:00
#### ```std::string xlnt::manifest::register_relationship(const class relationship &rel)```
2017-03-23 09:43:25 +08:00
Registers a new relationship already constructed elsewhere.
2017-01-27 08:57:19 +08:00
#### ```std::unordered_map<std::string, std::string> xlnt::manifest::unregister_relationship(const uri &source, const std::string &rel_id)```
2017-01-19 21:37:40 +08:00
Delete the relationship with the given id from source part. Returns a mapping of relationship IDs since IDs are shifted down. For example, if there are three relationships for part a.xml like [rId1, rId2, rId3] and rId2 is deleted, the resulting map would look like [rId3->rId2].
2017-01-27 08:57:19 +08:00
#### ```std::string xlnt::manifest::content_type(const path &part) const```
2017-01-19 21:37:40 +08:00
Given the path to a part, returns the content type of the part as a string.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::manifest::has_default_type(const std::string &extension) const```
2017-01-19 21:37:40 +08:00
Returns true if a default content type for the extension has been registered.
2017-01-27 08:57:19 +08:00
#### ```std::vector<std::string> xlnt::manifest::extensions_with_default_types() const```
2017-01-19 21:37:40 +08:00
Returns a vector of all extensions with registered default content types.
2017-01-27 08:57:19 +08:00
#### ```std::string xlnt::manifest::default_type(const std::string &extension) const```
2017-01-19 21:37:40 +08:00
Returns the registered default content type for parts of the given extension.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::manifest::register_default_type(const std::string &extension, const std::string &type)```
2017-01-19 21:37:40 +08:00
Associates the given extension with the given content type.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::manifest::unregister_default_type(const std::string &extension)```
2017-01-19 21:37:40 +08:00
Unregisters the default content type for the given extension.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::manifest::has_override_type(const path &part) const```
2017-01-19 21:37:40 +08:00
Returns true if a content type overriding the default content type has been registered for the given part.
2017-01-27 08:57:19 +08:00
#### ```std::string xlnt::manifest::override_type(const path &part) const```
2017-01-19 21:37:40 +08:00
Returns the override content type registered for the given part. Throws key_not_found exception if no override type was found.
2017-01-27 08:57:19 +08:00
#### ```std::vector<path> xlnt::manifest::parts_with_overriden_types() const```
2017-01-19 21:37:40 +08:00
Returns the path of every part in this manifest with an overriden content type.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::manifest::register_override_type(const path &part, const std::string &type)```
2017-01-19 21:37:40 +08:00
Overrides any default type registered for the part's extension with the given content type.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::manifest::unregister_override_type(const path &part)```
2017-01-19 21:37:40 +08:00
Unregisters the overriding content type of the given part.
### relationship
2017-01-27 08:57:19 +08:00
#### ```xlnt::relationship::relationship()```
2017-03-23 09:43:25 +08:00
Constructs a new empty relationship.
2017-01-27 08:57:19 +08:00
#### ```xlnt::relationship::relationship(const std::string &id, relationship_type t, const uri &source, const uri &target, xlnt::target_mode mode)```
2017-03-23 09:43:25 +08:00
Constructs a new relationship by specifying all of its properties.
2017-01-27 08:57:19 +08:00
#### ```std::string xlnt::relationship::id() const```
2017-01-19 21:37:40 +08:00
Returns a string of the form rId# that identifies the relationship.
2017-01-27 08:57:19 +08:00
#### ```relationship_type xlnt::relationship::type() const```
2017-01-19 21:37:40 +08:00
Returns the type of this relationship.
2017-01-27 08:57:19 +08:00
#### ```xlnt::target_mode xlnt::relationship::target_mode() const```
2017-01-19 21:37:40 +08:00
Returns whether the target of the relationship is internal or external to the package.
2017-01-27 08:57:19 +08:00
#### ```uri xlnt::relationship::source() const```
2017-01-19 21:37:40 +08:00
Returns the URI of the package part this relationship points to.
2017-01-27 08:57:19 +08:00
#### ```uri xlnt::relationship::target() const```
2017-01-19 21:37:40 +08:00
Returns the URI of the package part this relationship points to.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::relationship::operator==(const relationship &rhs) const```
2017-01-19 21:37:40 +08:00
Returns true if and only if rhs is equal to this relationship.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::relationship::operator!=(const relationship &rhs) const```
2017-01-19 21:37:40 +08:00
Returns true if and only if rhs is not equal to this relationship.
### uri
2017-01-27 08:57:19 +08:00
#### ```xlnt::uri::uri()```
2017-03-23 09:43:25 +08:00
Constructs an empty URI.
2017-01-27 08:57:19 +08:00
#### ```xlnt::uri::uri(const uri &base, const uri &relative)```
2017-03-23 09:43:25 +08:00
Constructs a URI by combining base with relative.
2017-01-27 08:57:19 +08:00
#### ```xlnt::uri::uri(const uri &base, const path &relative)```
2017-03-23 09:43:25 +08:00
Constructs a URI by combining base with relative path.
2017-01-27 08:57:19 +08:00
#### ```xlnt::uri::uri(const std::string &uri_string)```
2017-03-23 09:43:25 +08:00
Constructs a URI by parsing the given uri_string.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::uri::is_relative() const```
2017-03-23 09:43:25 +08:00
Returns true if this URI is relative.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::uri::is_absolute() const```
2017-03-23 09:43:25 +08:00
Returns true if this URI is not relative (i.e. absolute).
2017-01-27 08:57:19 +08:00
#### ```std::string xlnt::uri::scheme() const```
2017-03-23 09:43:25 +08:00
Returns the scheme of this URI. E.g. the scheme of http://user:pass@example.com is "http"
2017-01-27 08:57:19 +08:00
#### ```std::string xlnt::uri::authority() const```
2017-03-23 09:43:25 +08:00
Returns the authority of this URI. E.g. the authority of http://user:pass@example.com:80/document is "user:pass@example.com:80"
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::uri::has_authentication() const```
2017-03-23 09:43:25 +08:00
Returns true if an authentication section is specified for this URI.
2017-01-27 08:57:19 +08:00
#### ```std::string xlnt::uri::authentication() const```
2017-03-23 09:43:25 +08:00
Returns the authentication of this URI. E.g. the authentication of http://user:pass@example.com is "user:pass"
2017-01-27 08:57:19 +08:00
#### ```std::string xlnt::uri::username() const```
2017-03-23 09:43:25 +08:00
Returns the username of this URI. E.g. the username of http://user:pass@example.com is "user"
2017-01-27 08:57:19 +08:00
#### ```std::string xlnt::uri::password() const```
2017-03-23 09:43:25 +08:00
Returns the password of this URI. E.g. the password of http://user:pass@example.com is "pass"
2017-01-27 08:57:19 +08:00
#### ```std::string xlnt::uri::host() const```
2017-03-23 09:43:25 +08:00
Returns the host of this URI. E.g. the host of http://example.com:80/document is "example.com"
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::uri::has_port() const```
2017-03-23 09:43:25 +08:00
Returns true if a non-default port is specified for this URI.
2017-01-27 08:57:19 +08:00
#### ```std::size_t xlnt::uri::port() const```
2017-03-23 09:43:25 +08:00
Returns the port of this URI. E.g. the port of https://example.com:443/document is "443"
2017-01-27 08:57:19 +08:00
#### ```class path xlnt::uri::path() const```
2017-03-23 09:43:25 +08:00
Returns the path of this URI. E.g. the path of http://example.com/document is "/document"
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::uri::has_query() const```
2017-03-23 09:43:25 +08:00
Returns true if this URI has a non-null query string section.
2017-01-27 08:57:19 +08:00
#### ```std::string xlnt::uri::query() const```
2017-03-23 09:43:25 +08:00
Returns the query string of this URI. E.g. the query of http://example.com/document?v=1& x=3#abc is "v=1& x=3"
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::uri::has_fragment() const```
2017-03-23 09:43:25 +08:00
Returns true if this URI has a non-empty fragment section.
2017-01-27 08:57:19 +08:00
#### ```std::string xlnt::uri::fragment() const```
2017-03-23 09:43:25 +08:00
Returns the fragment section of this URI. E.g. the fragment of http://example.com/document#abc is "abc"
2017-01-27 08:57:19 +08:00
#### ```std::string xlnt::uri::to_string() const```
2017-03-23 09:43:25 +08:00
Returns a string representation of this URI.
2017-01-27 08:57:19 +08:00
#### ```uri xlnt::uri::make_absolute(const uri &base)```
2017-03-23 09:43:25 +08:00
If this URI is relative, an absolute URI will be returned by appending the path to the given absolute base URI.
2017-01-27 08:57:19 +08:00
#### ```uri xlnt::uri::make_reference(const uri &base)```
2017-03-23 09:43:25 +08:00
If this URI is absolute, a relative URI will be returned by removing the common base path from the given absolute base URI.
#### ```bool xlnt::uri::operator==(const uri &other) const```
Returns true if this URI is equivalent to other.
2017-01-19 21:37:40 +08:00
## Styles Module
### alignment
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::alignment::shrink() const```
#### ```alignment& xlnt::alignment::shrink(bool shrink_to_fit)```
#### ```bool xlnt::alignment::wrap() const```
#### ```alignment& xlnt::alignment::wrap(bool wrap_text)```
#### ```optional<int> xlnt::alignment::indent() const```
#### ```alignment& xlnt::alignment::indent(int indent_size)```
#### ```optional<int> xlnt::alignment::rotation() const```
#### ```alignment& xlnt::alignment::rotation(int text_rotation)```
#### ```optional<horizontal_alignment> xlnt::alignment::horizontal() const```
#### ```alignment& xlnt::alignment::horizontal(horizontal_alignment horizontal)```
#### ```optional<vertical_alignment> xlnt::alignment::vertical() const```
#### ```alignment& xlnt::alignment::vertical(vertical_alignment vertical)```
2017-03-23 09:43:25 +08:00
#### ```bool xlnt::alignment::operator==(const alignment &other) const```
Returns true if this alignment is equivalent to other.
#### ```bool xlnt::alignment::operator!=(const alignment &other) const```
Returns true if this alignment is not equivalent to other.
2017-01-19 21:37:40 +08:00
### border
2017-01-27 08:57:19 +08:00
#### ```static const std::vector<border_side>& xlnt::border::all_sides()```
2017-03-23 09:43:25 +08:00
A vector to the all of the border sides for iteration.
2017-01-27 08:57:19 +08:00
#### ```xlnt::border::border()```
2017-03-23 09:43:25 +08:00
Constructs a default border.
2017-01-27 08:57:19 +08:00
#### ```optional<border_property> xlnt::border::side(border_side s) const```
2017-03-23 09:43:25 +08:00
Returns the border properties of the given side.
2017-01-27 08:57:19 +08:00
#### ```border& xlnt::border::side(border_side s, const border_property &prop)```
2017-03-23 09:43:25 +08:00
Sets the border properties of the side s to prop.
2017-01-27 08:57:19 +08:00
#### ```optional<diagonal_direction> xlnt::border::diagonal() const```
2017-03-23 09:43:25 +08:00
Returns the diagonal direction of this border.
2017-01-27 08:57:19 +08:00
#### ```border& xlnt::border::diagonal(diagonal_direction dir)```
2017-03-23 09:43:25 +08:00
Sets the diagonal direction of this border to dir.
#### ```bool xlnt::border::operator==(const border &right) const```
2017-01-19 21:37:40 +08:00
Returns true if left is exactly equal to right.
2017-03-23 09:43:25 +08:00
#### ```bool xlnt::border::operator!=(const border &right) const```
2017-01-19 21:37:40 +08:00
Returns true if left is not exactly equal to right.
### border_property
2017-01-27 08:57:19 +08:00
#### ```optional<class color> xlnt::border::border_property::color() const```
2017-03-23 09:43:25 +08:00
Returns the color of the side.
2017-01-27 08:57:19 +08:00
#### ```border_property& xlnt::border::border_property::color(const xlnt::color &c)```
2017-03-23 09:43:25 +08:00
Sets the color of the side and returns a reference to the side properties.
2017-01-27 08:57:19 +08:00
#### ```optional<border_style> xlnt::border::border_property::style() const```
2017-03-23 09:43:25 +08:00
Returns the style of the side.
2017-01-27 08:57:19 +08:00
#### ```border_property& xlnt::border::border_property::style(border_style style)```
2017-03-23 09:43:25 +08:00
Sets the style of the side and returns a reference to the side properties.
#### ```bool xlnt::border::border_property::operator==(const border_property &right) const```
2017-01-19 21:37:40 +08:00
Returns true if left is exactly equal to right.
2017-03-23 09:43:25 +08:00
#### ```bool xlnt::border::border_property::operator!=(const border_property &right) const```
2017-01-19 21:37:40 +08:00
Returns true if left is not exactly equal to right.
### indexed_color
2017-01-27 08:57:19 +08:00
#### ```xlnt::indexed_color::indexed_color(std::size_t index)```
#### ```std::size_t xlnt::indexed_color::index() const```
#### ```void xlnt::indexed_color::index(std::size_t index)```
2017-01-19 21:37:40 +08:00
### theme_color
2017-01-27 08:57:19 +08:00
#### ```xlnt::theme_color::theme_color(std::size_t index)```
#### ```std::size_t xlnt::theme_color::index() const```
#### ```void xlnt::theme_color::index(std::size_t index)```
2017-01-19 21:37:40 +08:00
### rgb_color
2017-01-27 08:57:19 +08:00
#### ```xlnt::rgb_color::rgb_color(const std::string &hex_string)```
#### ```xlnt::rgb_color::rgb_color(std::uint8_t r, std::uint8_t g, std::uint8_t b, std::uint8_t a=255)```
#### ```std::string xlnt::rgb_color::hex_string() const```
#### ```std::uint8_t xlnt::rgb_color::red() const```
#### ```std::uint8_t xlnt::rgb_color::green() const```
#### ```std::uint8_t xlnt::rgb_color::blue() const```
#### ```std::uint8_t xlnt::rgb_color::alpha() const```
#### ```std::array<std::uint8_t, 3> xlnt::rgb_color::rgb() const```
#### ```std::array<std::uint8_t, 4> xlnt::rgb_color::rgba() const```
2017-01-19 21:37:40 +08:00
### color
2017-01-27 08:57:19 +08:00
#### ```static const color xlnt::color::black()```
#### ```static const color xlnt::color::white()```
#### ```static const color xlnt::color::red()```
#### ```static const color xlnt::color::darkred()```
#### ```static const color xlnt::color::blue()```
#### ```static const color xlnt::color::darkblue()```
#### ```static const color xlnt::color::green()```
#### ```static const color xlnt::color::darkgreen()```
#### ```static const color xlnt::color::yellow()```
#### ```static const color xlnt::color::darkyellow()```
#### ```xlnt::color::color()```
#### ```xlnt::color::color(const rgb_color &rgb)```
#### ```xlnt::color::color(const indexed_color &indexed)```
#### ```xlnt::color::color(const theme_color &theme)```
#### ```color_type xlnt::color::type() const```
#### ```bool xlnt::color::is_auto() const```
#### ```void xlnt::color::auto_(bool value)```
#### ```const rgb_color& xlnt::color::rgb() const```
#### ```const indexed_color& xlnt::color::indexed() const```
#### ```const theme_color& xlnt::color::theme() const```
#### ```double xlnt::color::tint() const```
#### ```void xlnt::color::tint(double tint)```
#### ```bool xlnt::color::operator==(const color &other) const```
#### ```bool xlnt::color::operator!=(const color &other) const```
2017-01-19 21:37:40 +08:00
### pattern_fill
2017-01-27 08:57:19 +08:00
#### ```xlnt::pattern_fill::pattern_fill()```
#### ```pattern_fill_type xlnt::pattern_fill::type() const```
#### ```pattern_fill& xlnt::pattern_fill::type(pattern_fill_type new_type)```
#### ```optional<color> xlnt::pattern_fill::foreground() const```
#### ```pattern_fill& xlnt::pattern_fill::foreground(const color &foreground)```
#### ```optional<color> xlnt::pattern_fill::background() const```
#### ```pattern_fill& xlnt::pattern_fill::background(const color &background)```
#### ```bool operator==(const pattern_fill &left, const pattern_fill &right)```
2017-01-19 21:37:40 +08:00
Returns true if left is exactly equal to right.
2017-01-27 08:57:19 +08:00
#### ```bool operator!=(const pattern_fill &left, const pattern_fill &right)```
2017-01-19 21:37:40 +08:00
Returns true if left is not exactly equal to right.
### gradient_fill
2017-01-27 08:57:19 +08:00
#### ```xlnt::gradient_fill::gradient_fill()```
#### ```gradient_fill_type xlnt::gradient_fill::type() const```
#### ```gradient_fill& xlnt::gradient_fill::type(gradient_fill_type new_type)```
#### ```gradient_fill& xlnt::gradient_fill::degree(double degree)```
#### ```double xlnt::gradient_fill::degree() const```
#### ```double xlnt::gradient_fill::left() const```
#### ```gradient_fill& xlnt::gradient_fill::left(double value)```
#### ```double xlnt::gradient_fill::right() const```
#### ```gradient_fill& xlnt::gradient_fill::right(double value)```
#### ```double xlnt::gradient_fill::top() const```
#### ```gradient_fill& xlnt::gradient_fill::top(double value)```
#### ```double xlnt::gradient_fill::bottom() const```
#### ```gradient_fill& xlnt::gradient_fill::bottom(double value)```
#### ```gradient_fill& xlnt::gradient_fill::add_stop(double position, color stop_color)```
#### ```gradient_fill& xlnt::gradient_fill::clear_stops()```
#### ```std::unordered_map<double, color> xlnt::gradient_fill::stops() const```
#### ```bool operator==(const gradient_fill &left, const gradient_fill &right)```
2017-01-19 21:37:40 +08:00
Returns true if left is exactly equal to right.
2017-01-27 08:57:19 +08:00
#### ```bool operator!=(const gradient_fill &left, const gradient_fill &right)```
2017-01-19 21:37:40 +08:00
Returns true if left is not exactly equal to right.
### fill
2017-01-27 08:57:19 +08:00
#### ```static fill xlnt::fill::solid(const color &fill_color)```
2017-01-19 21:37:40 +08:00
Helper method for the most common use case, setting the fill color of a cell to a single solid color. The foreground and background colors of a fill are not the same as the foreground and background colors of a cell. When setting a fill color in Excel, a new fill is created with the given color as the fill's fgColor and index color number 64 as the bgColor. This method creates a fill in the same way.
2017-01-27 08:57:19 +08:00
#### ```xlnt::fill::fill()```
2017-01-19 21:37:40 +08:00
Constructs a fill initialized as a none-type pattern fill with no foreground or background colors.
2017-01-27 08:57:19 +08:00
#### ```xlnt::fill::fill(const pattern_fill &pattern)```
2017-01-19 21:37:40 +08:00
Constructs a fill initialized as a pattern fill based on the given pattern.
2017-01-27 08:57:19 +08:00
#### ```xlnt::fill::fill(const gradient_fill &gradient)```
2017-01-19 21:37:40 +08:00
Constructs a fill initialized as a gradient fill based on the given gradient.
2017-01-27 08:57:19 +08:00
#### ```fill_type xlnt::fill::type() const```
2017-01-19 21:37:40 +08:00
Returns the fill_type of this fill depending on how it was constructed.
2017-01-27 08:57:19 +08:00
#### ```class gradient_fill xlnt::fill::gradient_fill() const```
2017-01-19 21:37:40 +08:00
Returns the gradient fill represented by this fill. Throws an invalid_attribute exception if this is not a gradient fill.
2017-01-27 08:57:19 +08:00
#### ```class pattern_fill xlnt::fill::pattern_fill() const```
2017-01-19 21:37:40 +08:00
Returns the pattern fill represented by this fill. Throws an invalid_attribute exception if this is not a pattern fill.
2017-01-27 08:57:19 +08:00
#### ```bool operator==(const fill &left, const fill &right)```
2017-01-19 21:37:40 +08:00
Returns true if left is exactly equal to right.
2017-01-27 08:57:19 +08:00
#### ```bool operator!=(const fill &left, const fill &right)```
2017-01-19 21:37:40 +08:00
Returns true if left is not exactly equal to right.
### font
2017-01-27 08:57:19 +08:00
#### ```undefinedundefined```
#### ```bool operator==(const font &left, const font &right)```
2017-01-19 21:37:40 +08:00
Returns true if left is exactly equal to right.
2017-01-27 08:57:19 +08:00
#### ```bool operator!=(const font &left, const font &right)```
2017-01-19 21:37:40 +08:00
Returns true if left is not exactly equal to right.
2017-01-27 08:57:19 +08:00
#### ```xlnt::font::font()```
#### ```font& xlnt::font::bold(bool bold)```
#### ```bool xlnt::font::bold() const```
#### ```font& xlnt::font::superscript(bool superscript)```
#### ```bool xlnt::font::superscript() const```
#### ```font& xlnt::font::italic(bool italic)```
#### ```bool xlnt::font::italic() const```
#### ```font& xlnt::font::strikethrough(bool strikethrough)```
#### ```bool xlnt::font::strikethrough() const```
2017-03-23 09:43:25 +08:00
#### ```font& xlnt::font::outline(bool outline)```
#### ```bool xlnt::font::outline() const```
#### ```font& xlnt::font::shadow(bool shadow)```
#### ```bool xlnt::font::shadow() const```
2017-01-27 08:57:19 +08:00
#### ```font& xlnt::font::underline(underline_style new_underline)```
#### ```bool xlnt::font::underlined() const```
#### ```underline_style xlnt::font::underline() const```
#### ```bool xlnt::font::has_size() const```
#### ```font& xlnt::font::size(double size)```
#### ```double xlnt::font::size() const```
#### ```bool xlnt::font::has_name() const```
#### ```font& xlnt::font::name(const std::string &name)```
#### ```std::string xlnt::font::name() const```
#### ```bool xlnt::font::has_color() const```
#### ```font& xlnt::font::color(const color &c)```
#### ```xlnt::color xlnt::font::color() const```
#### ```bool xlnt::font::has_family() const```
#### ```font& xlnt::font::family(std::size_t family)```
#### ```std::size_t xlnt::font::family() const```
2017-03-23 09:43:25 +08:00
#### ```bool xlnt::font::has_charset() const```
#### ```font& xlnt::font::charset(std::size_t charset)```
#### ```std::size_t xlnt::font::charset() const```
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::font::has_scheme() const```
#### ```font& xlnt::font::scheme(const std::string &scheme)```
#### ```std::string xlnt::font::scheme() const```
2017-01-19 21:37:40 +08:00
### format
2017-01-27 08:57:19 +08:00
#### ```friend struct detail::stylesheetundefined```
#### ```std::size_t xlnt::format::id() const```
#### ```class alignment& xlnt::format::alignment()```
#### ```const class alignment& xlnt::format::alignment() const```
#### ```format xlnt::format::alignment(const xlnt::alignment &new_alignment, bool applied)```
#### ```bool xlnt::format::alignment_applied() const```
#### ```class border& xlnt::format::border()```
#### ```const class border& xlnt::format::border() const```
#### ```format xlnt::format::border(const xlnt::border &new_border, bool applied)```
#### ```bool xlnt::format::border_applied() const```
#### ```class fill& xlnt::format::fill()```
#### ```const class fill& xlnt::format::fill() const```
#### ```format xlnt::format::fill(const xlnt::fill &new_fill, bool applied)```
#### ```bool xlnt::format::fill_applied() const```
#### ```class font& xlnt::format::font()```
#### ```const class font& xlnt::format::font() const```
#### ```format xlnt::format::font(const xlnt::font &new_font, bool applied)```
#### ```bool xlnt::format::font_applied() const```
#### ```class number_format& xlnt::format::number_format()```
#### ```const class number_format& xlnt::format::number_format() const```
#### ```format xlnt::format::number_format(const xlnt::number_format &new_number_format, bool applied)```
#### ```bool xlnt::format::number_format_applied() const```
#### ```class protection& xlnt::format::protection()```
#### ```const class protection& xlnt::format::protection() const```
#### ```format xlnt::format::protection(const xlnt::protection &new_protection, bool applied)```
#### ```bool xlnt::format::protection_applied() const```
2017-03-23 09:43:25 +08:00
#### ```bool xlnt::format::pivot_button() const```
#### ```void xlnt::format::pivot_button(bool show)```
#### ```bool xlnt::format::quote_prefix() const```
#### ```void xlnt::format::quote_prefix(bool quote)```
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::format::has_style() const```
#### ```void xlnt::format::clear_style()```
#### ```format xlnt::format::style(const std::string &name)```
#### ```format xlnt::format::style(const class style &new_style)```
#### ```const class style xlnt::format::style() const```
2017-01-19 21:37:40 +08:00
### number_format
2017-01-27 08:57:19 +08:00
#### ```static const number_format xlnt::number_format::general()```
#### ```static const number_format xlnt::number_format::text()```
#### ```static const number_format xlnt::number_format::number()```
#### ```static const number_format xlnt::number_format::number_00()```
#### ```static const number_format xlnt::number_format::number_comma_separated1()```
#### ```static const number_format xlnt::number_format::percentage()```
#### ```static const number_format xlnt::number_format::percentage_00()```
#### ```static const number_format xlnt::number_format::date_yyyymmdd2()```
#### ```static const number_format xlnt::number_format::date_yymmdd()```
#### ```static const number_format xlnt::number_format::date_ddmmyyyy()```
#### ```static const number_format xlnt::number_format::date_dmyslash()```
#### ```static const number_format xlnt::number_format::date_dmyminus()```
#### ```static const number_format xlnt::number_format::date_dmminus()```
#### ```static const number_format xlnt::number_format::date_myminus()```
#### ```static const number_format xlnt::number_format::date_xlsx14()```
#### ```static const number_format xlnt::number_format::date_xlsx15()```
#### ```static const number_format xlnt::number_format::date_xlsx16()```
#### ```static const number_format xlnt::number_format::date_xlsx17()```
#### ```static const number_format xlnt::number_format::date_xlsx22()```
#### ```static const number_format xlnt::number_format::date_datetime()```
#### ```static const number_format xlnt::number_format::date_time1()```
#### ```static const number_format xlnt::number_format::date_time2()```
#### ```static const number_format xlnt::number_format::date_time3()```
#### ```static const number_format xlnt::number_format::date_time4()```
#### ```static const number_format xlnt::number_format::date_time5()```
#### ```static const number_format xlnt::number_format::date_time6()```
#### ```static bool xlnt::number_format::is_builtin_format(std::size_t builtin_id)```
#### ```static const number_format& xlnt::number_format::from_builtin_id(std::size_t builtin_id)```
#### ```xlnt::number_format::number_format()```
#### ```xlnt::number_format::number_format(std::size_t builtin_id)```
#### ```xlnt::number_format::number_format(const std::string &code)```
#### ```xlnt::number_format::number_format(const std::string &code, std::size_t custom_id)```
#### ```void xlnt::number_format::format_string(const std::string &format_code)```
#### ```void xlnt::number_format::format_string(const std::string &format_code, std::size_t custom_id)```
#### ```std::string xlnt::number_format::format_string() const```
#### ```bool xlnt::number_format::has_id() const```
#### ```void xlnt::number_format::id(std::size_t id)```
#### ```std::size_t xlnt::number_format::id() const```
#### ```std::string xlnt::number_format::format(const std::string &text) const```
#### ```std::string xlnt::number_format::format(long double number, calendar base_date) const```
#### ```bool xlnt::number_format::is_date_format() const```
#### ```bool operator==(const number_format &left, const number_format &right)```
2017-01-19 21:37:40 +08:00
Returns true if left is exactly equal to right.
2017-01-27 08:57:19 +08:00
#### ```bool operator!=(const number_format &left, const number_format &right)```
2017-01-19 21:37:40 +08:00
Returns true if left is not exactly equal to right.
### protection
2017-01-27 08:57:19 +08:00
#### ```static protection xlnt::protection::unlocked_and_visible()```
#### ```static protection xlnt::protection::locked_and_visible()```
#### ```static protection xlnt::protection::unlocked_and_hidden()```
#### ```static protection xlnt::protection::locked_and_hidden()```
#### ```xlnt::protection::protection()```
#### ```bool xlnt::protection::locked() const```
#### ```protection& xlnt::protection::locked(bool locked)```
#### ```bool xlnt::protection::hidden() const```
#### ```protection& xlnt::protection::hidden(bool hidden)```
#### ```bool operator==(const protection &left, const protection &right)```
2017-01-19 21:37:40 +08:00
Returns true if left is exactly equal to right.
2017-01-27 08:57:19 +08:00
#### ```bool operator!=(const protection &left, const protection &right)```
2017-01-19 21:37:40 +08:00
Returns true if left is not exactly equal to right.
### style
2017-01-27 08:57:19 +08:00
#### ```friend struct detail::stylesheetundefined```
#### ```friend class detail::xlsx_consumerundefined```
#### ```xlnt::style::style()=delete```
2017-01-19 21:37:40 +08:00
Delete zero-argument constructor
2017-01-27 08:57:19 +08:00
#### ```xlnt::style::style(const style &other)=default```
2017-01-19 21:37:40 +08:00
Default copy constructor
2017-01-27 08:57:19 +08:00
#### ```std::string xlnt::style::name() const```
2017-01-19 21:37:40 +08:00
Return the name of this style.
2017-01-27 08:57:19 +08:00
#### ```style xlnt::style::name(const std::string &name)```
#### ```bool xlnt::style::hidden() const```
#### ```style xlnt::style::hidden(bool value)```
#### ```optional<bool> xlnt::style::custom() const```
#### ```style xlnt::style::custom(bool value)```
#### ```optional<std::size_t> xlnt::style::builtin_id() const```
#### ```style xlnt::style::builtin_id(std::size_t builtin_id)```
#### ```class alignment& xlnt::style::alignment()```
#### ```const class alignment& xlnt::style::alignment() const```
#### ```style xlnt::style::alignment(const xlnt::alignment &new_alignment, bool applied=true)```
#### ```bool xlnt::style::alignment_applied() const```
#### ```class border& xlnt::style::border()```
#### ```const class border& xlnt::style::border() const```
#### ```style xlnt::style::border(const xlnt::border &new_border, bool applied=true)```
#### ```bool xlnt::style::border_applied() const```
#### ```class fill& xlnt::style::fill()```
#### ```const class fill& xlnt::style::fill() const```
#### ```style xlnt::style::fill(const xlnt::fill &new_fill, bool applied=true)```
#### ```bool xlnt::style::fill_applied() const```
#### ```class font& xlnt::style::font()```
#### ```const class font& xlnt::style::font() const```
#### ```style xlnt::style::font(const xlnt::font &new_font, bool applied=true)```
#### ```bool xlnt::style::font_applied() const```
#### ```class number_format& xlnt::style::number_format()```
#### ```const class number_format& xlnt::style::number_format() const```
#### ```style xlnt::style::number_format(const xlnt::number_format &new_number_format, bool applied=true)```
#### ```bool xlnt::style::number_format_applied() const```
#### ```class protection& xlnt::style::protection()```
#### ```const class protection& xlnt::style::protection() const```
#### ```style xlnt::style::protection(const xlnt::protection &new_protection, bool applied=true)```
#### ```bool xlnt::style::protection_applied() const```
2017-03-23 09:43:25 +08:00
#### ```bool xlnt::style::pivot_button() const```
#### ```void xlnt::style::pivot_button(bool show)```
#### ```bool xlnt::style::quote_prefix() const```
#### ```void xlnt::style::quote_prefix(bool quote)```
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::style::operator==(const style &other) const```
2017-01-19 21:37:40 +08:00
## Utils Module
### date
2017-01-27 08:57:19 +08:00
#### ```int xlnt::date::yearundefined```
#### ```int xlnt::date::monthundefined```
#### ```int xlnt::date::dayundefined```
#### ```static date xlnt::date::today()```
2017-01-19 21:37:40 +08:00
Return the current date according to the system time.
2017-01-27 08:57:19 +08:00
#### ```static date xlnt::date::from_number(int days_since_base_year, calendar base_date)```
2017-01-19 21:37:40 +08:00
Return a date by adding days_since_base_year to base_date. This includes leap years.
2017-01-27 08:57:19 +08:00
#### ```xlnt::date::date(int year_, int month_, int day_)```
#### ```int xlnt::date::to_number(calendar base_date) const```
2017-01-19 21:37:40 +08:00
Return the number of days between this date and base_date.
2017-01-27 08:57:19 +08:00
#### ```int xlnt::date::weekday() const```
#### ```bool xlnt::date::operator==(const date &comparand) const```
2017-01-19 21:37:40 +08:00
Return true if this date is equal to comparand.
### datetime
2017-01-27 08:57:19 +08:00
#### ```int xlnt::datetime::yearundefined```
#### ```int xlnt::datetime::monthundefined```
#### ```int xlnt::datetime::dayundefined```
#### ```int xlnt::datetime::hourundefined```
#### ```int xlnt::datetime::minuteundefined```
#### ```int xlnt::datetime::secondundefined```
#### ```int xlnt::datetime::microsecondundefined```
#### ```static datetime xlnt::datetime::now()```
2017-01-19 21:37:40 +08:00
Return the current date and time according to the system time.
2017-01-27 08:57:19 +08:00
#### ```static datetime xlnt::datetime::today()```
2017-01-19 21:37:40 +08:00
Return the current date and time according to the system time. This is equivalent to datetime::now().
2017-01-27 08:57:19 +08:00
#### ```static datetime xlnt::datetime::from_number(long double number, calendar base_date)```
2017-01-19 21:37:40 +08:00
Return a datetime from number by converting the integer part into a date and the fractional part into a time according to date::from_number and time::from_number.
2017-01-27 08:57:19 +08:00
#### ```static datetime xlnt::datetime::from_iso_string(const std::string &iso_string)```
#### ```xlnt::datetime::datetime(const date &d, const time &t)```
#### ```xlnt::datetime::datetime(int year_, int month_, int day_, int hour_=0, int minute_=0, int second_=0, int microsecond_=0)```
#### ```std::string xlnt::datetime::to_string() const```
#### ```std::string xlnt::datetime::to_iso_string() const```
#### ```long double xlnt::datetime::to_number(calendar base_date) const```
#### ```bool xlnt::datetime::operator==(const datetime &comparand) const```
#### ```int xlnt::datetime::weekday() const```
2017-01-19 21:37:40 +08:00
### exception
2017-01-27 08:57:19 +08:00
#### ```xlnt::exception::exception(const std::string &message)```
#### ```xlnt::exception::exception(const exception &)=default```
#### ```virtual xlnt::exception::~exception()```
#### ```void xlnt::exception::message(const std::string &message)```
2017-01-19 21:37:40 +08:00
### invalid_parameter
2017-01-27 08:57:19 +08:00
#### ```xlnt::invalid_parameter::invalid_parameter()```
#### ```xlnt::invalid_parameter::invalid_parameter(const invalid_parameter &)=default```
#### ```virtual xlnt::invalid_parameter::~invalid_parameter()```
2017-01-19 21:37:40 +08:00
### invalid_sheet_title
2017-01-27 08:57:19 +08:00
#### ```xlnt::invalid_sheet_title::invalid_sheet_title(const std::string &title)```
#### ```xlnt::invalid_sheet_title::invalid_sheet_title(const invalid_sheet_title &)=default```
#### ```virtual xlnt::invalid_sheet_title::~invalid_sheet_title()```
2017-01-19 21:37:40 +08:00
### missing_number_format
2017-01-27 08:57:19 +08:00
#### ```xlnt::missing_number_format::missing_number_format()```
#### ```virtual xlnt::missing_number_format::~missing_number_format()```
2017-01-19 21:37:40 +08:00
### invalid_file
2017-01-27 08:57:19 +08:00
#### ```xlnt::invalid_file::invalid_file(const std::string &filename)```
#### ```xlnt::invalid_file::invalid_file(const invalid_file &)=default```
#### ```virtual xlnt::invalid_file::~invalid_file()```
2017-01-19 21:37:40 +08:00
### illegal_character
2017-01-27 08:57:19 +08:00
#### ```xlnt::illegal_character::illegal_character(char c)```
#### ```xlnt::illegal_character::illegal_character(const illegal_character &)=default```
#### ```virtual xlnt::illegal_character::~illegal_character()```
2017-01-19 21:37:40 +08:00
### invalid_data_type
2017-01-27 08:57:19 +08:00
#### ```xlnt::invalid_data_type::invalid_data_type()```
#### ```xlnt::invalid_data_type::invalid_data_type(const invalid_data_type &)=default```
#### ```virtual xlnt::invalid_data_type::~invalid_data_type()```
2017-01-19 21:37:40 +08:00
### invalid_column_string_index
2017-01-27 08:57:19 +08:00
#### ```xlnt::invalid_column_string_index::invalid_column_string_index()```
#### ```xlnt::invalid_column_string_index::invalid_column_string_index(const invalid_column_string_index &)=default```
#### ```virtual xlnt::invalid_column_string_index::~invalid_column_string_index()```
2017-01-19 21:37:40 +08:00
### invalid_cell_reference
2017-01-27 08:57:19 +08:00
#### ```xlnt::invalid_cell_reference::invalid_cell_reference(column_t column, row_t row)```
#### ```xlnt::invalid_cell_reference::invalid_cell_reference(const std::string &reference_string)```
#### ```xlnt::invalid_cell_reference::invalid_cell_reference(const invalid_cell_reference &)=default```
#### ```virtual xlnt::invalid_cell_reference::~invalid_cell_reference()```
2017-01-19 21:37:40 +08:00
### invalid_attribute
2017-01-27 08:57:19 +08:00
#### ```xlnt::invalid_attribute::invalid_attribute()```
#### ```xlnt::invalid_attribute::invalid_attribute(const invalid_attribute &)=default```
#### ```virtual xlnt::invalid_attribute::~invalid_attribute()```
2017-01-19 21:37:40 +08:00
### key_not_found
2017-01-27 08:57:19 +08:00
#### ```xlnt::key_not_found::key_not_found()```
#### ```xlnt::key_not_found::key_not_found(const key_not_found &)=default```
#### ```virtual xlnt::key_not_found::~key_not_found()```
2017-01-19 21:37:40 +08:00
### no_visible_worksheets
2017-01-27 08:57:19 +08:00
#### ```xlnt::no_visible_worksheets::no_visible_worksheets()```
#### ```xlnt::no_visible_worksheets::no_visible_worksheets(const no_visible_worksheets &)=default```
#### ```virtual xlnt::no_visible_worksheets::~no_visible_worksheets()```
2017-01-19 21:37:40 +08:00
### unhandled_switch_case
2017-01-27 08:57:19 +08:00
#### ```xlnt::unhandled_switch_case::unhandled_switch_case()```
2017-03-23 09:43:25 +08:00
#### ```xlnt::unhandled_switch_case::unhandled_switch_case(const unhandled_switch_case &)=default```
2017-01-27 08:57:19 +08:00
#### ```virtual xlnt::unhandled_switch_case::~unhandled_switch_case()```
2017-01-19 21:37:40 +08:00
### unsupported
2017-01-27 08:57:19 +08:00
#### ```xlnt::unsupported::unsupported(const std::string &message)```
#### ```xlnt::unsupported::unsupported(const unsupported &)=default```
#### ```virtual xlnt::unsupported::~unsupported()```
2017-01-19 21:37:40 +08:00
### optional
2017-01-27 08:57:19 +08:00
#### ```xlnt::optional< T >::optional()```
Default contructor. is_set() will be false initially.
#### ```xlnt::optional< T >::optional(const T &value)```
Constructs this optional with a value.
#### ```bool xlnt::optional< T >::is_set() const```
Returns true if this object currently has a value set. This should be called before accessing the value with optional::get().
#### ```void xlnt::optional< T >::set(const T &value)```
Sets the value to value.
#### ```T& xlnt::optional< T >::get()```
Gets the value. If no value has been initialized in this object, an xlnt::invalid_attribute exception will be thrown.
#### ```const T& xlnt::optional< T >::get() const```
Gets the value. If no value has been initialized in this object, an xlnt::invalid_attribute exception will be thrown.
#### ```void xlnt::optional< T >::clear()```
Resets the internal value using its default constructor. After this is called, is_set() will return false until a new value is provided.
#### ```optional& xlnt::optional< T >::operator=(const T &rhs)```
Assignment operator. Equivalent to setting the value using optional::set.
#### ```bool xlnt::optional< T >::operator==(const optional< T > &other) const```
Returns true if neither this nor other have a value or both have a value and those values are equal according to their equality operator.
2017-01-19 21:37:40 +08:00
### path
2017-01-27 08:57:19 +08:00
#### ```static char xlnt::path::system_separator()```
2017-01-19 21:37:40 +08:00
The system-specific path separator character (e.g. '/' or '\').
2017-01-27 08:57:19 +08:00
#### ```xlnt::path::path()```
2017-01-19 21:37:40 +08:00
Construct an empty path.
2017-01-27 08:57:19 +08:00
#### ```xlnt::path::path(const std::string &path_string)```
2017-01-19 21:37:40 +08:00
Counstruct a path from a string representing the path.
2017-01-27 08:57:19 +08:00
#### ```xlnt::path::path(const std::string &path_string, char sep)```
2017-01-19 21:37:40 +08:00
Construct a path from a string with an explicit directory seprator.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::path::is_relative() const```
2017-01-19 21:37:40 +08:00
Return true iff this path doesn't begin with / (or a drive letter on Windows).
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::path::is_absolute() const```
2017-01-19 21:37:40 +08:00
Return true iff path::is_relative() is false.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::path::is_root() const```
2017-01-19 21:37:40 +08:00
Return true iff this path is the root directory.
2017-01-27 08:57:19 +08:00
#### ```path xlnt::path::parent() const```
2017-01-19 21:37:40 +08:00
Return a new path that points to the directory containing the current path Return the path unchanged if this path is the absolute or relative root.
2017-01-27 08:57:19 +08:00
#### ```std::string xlnt::path::filename() const```
2017-01-19 21:37:40 +08:00
Return the last component of this path.
2017-01-27 08:57:19 +08:00
#### ```std::string xlnt::path::extension() const```
2017-01-19 21:37:40 +08:00
Return the part of the path following the last dot in the filename.
2017-01-27 08:57:19 +08:00
#### ```std::pair<std::string, std::string> xlnt::path::split_extension() const```
2017-01-19 21:37:40 +08:00
Return a pair of strings resulting from splitting the filename on the last dot.
2017-01-27 08:57:19 +08:00
#### ```std::vector<std::string> xlnt::path::split() const```
2017-01-19 21:37:40 +08:00
Create a string representing this path separated by the provided separator or the system-default separator if not provided.
2017-01-27 08:57:19 +08:00
#### ```std::string xlnt::path::string() const```
2017-01-19 21:37:40 +08:00
Create a string representing this path separated by the provided separator or the system-default separator if not provided.
2017-01-27 08:57:19 +08:00
#### ```path xlnt::path::resolve(const path &base_path) const```
2017-01-19 21:37:40 +08:00
If this path is relative, append each component of this path to base_path and return the resulting absolute path. Otherwise, the the current path will be returned and base_path will be ignored.
2017-01-27 08:57:19 +08:00
#### ```path xlnt::path::relative_to(const path &base_path) const```
2017-01-19 21:37:40 +08:00
The inverse of path::resolve. Creates a relative path from an absolute path by removing the common root between base_path and this path. If the current path is already relative, return it unchanged.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::path::exists() const```
2017-01-19 21:37:40 +08:00
Return true iff the file or directory pointed to by this path exists on the filesystem.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::path::is_directory() const```
2017-01-19 21:37:40 +08:00
Return true if the file or directory pointed to by this path is a directory.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::path::is_file() const```
2017-01-19 21:37:40 +08:00
Return true if the file or directory pointed to by this path is a regular file.
2017-01-27 08:57:19 +08:00
#### ```std::string xlnt::path::read_contents() const```
2017-01-19 21:37:40 +08:00
Open the file pointed to by this path and return a string containing the files contents.
2017-01-27 08:57:19 +08:00
#### ```path xlnt::path::append(const std::string &to_append) const```
2017-01-19 21:37:40 +08:00
Append the provided part to this path and return the result.
2017-01-27 08:57:19 +08:00
#### ```path xlnt::path::append(const path &to_append) const```
2017-01-19 21:37:40 +08:00
Append the provided part to this path and return the result.
2017-01-27 08:57:19 +08:00
#### ```bool operator==(const path &left, const path &right)```
2017-01-19 21:37:40 +08:00
Returns true if left path is equal to right path.
### path >
2017-01-27 08:57:19 +08:00
#### ```size_t std::hash< xlnt::path >::operator()(const xlnt::path &p) const```
2017-01-19 21:37:40 +08:00
### scoped_enum_hash
2017-01-27 08:57:19 +08:00
#### ```std::size_t xlnt::scoped_enum_hash< Enum >::operator()(Enum e) const```
2017-03-23 09:43:25 +08:00
Cast the enumeration e to a std::size_t and hash that value using std::hash.
2017-01-19 21:37:40 +08:00
### time
2017-01-27 08:57:19 +08:00
#### ```int xlnt::time::hourundefined```
#### ```int xlnt::time::minuteundefined```
#### ```int xlnt::time::secondundefined```
#### ```int xlnt::time::microsecondundefined```
#### ```static time xlnt::time::now()```
2017-01-19 21:37:40 +08:00
Return the current time according to the system time.
2017-01-27 08:57:19 +08:00
#### ```static time xlnt::time::from_number(long double number)```
2017-01-19 21:37:40 +08:00
Return a time from a number representing a fraction of a day. The integer part of number will be ignored. 0.5 would return time(12, 0, 0, 0) or noon, halfway through the day.
2017-01-27 08:57:19 +08:00
#### ```xlnt::time::time(int hour_=0, int minute_=0, int second_=0, int microsecond_=0)```
#### ```xlnt::time::time(const std::string &time_string)```
#### ```long double xlnt::time::to_number() const```
#### ```bool xlnt::time::operator==(const time &comparand) const```
2017-01-19 21:37:40 +08:00
### timedelta
2017-01-27 08:57:19 +08:00
#### ```int xlnt::timedelta::daysundefined```
#### ```int xlnt::timedelta::hoursundefined```
#### ```int xlnt::timedelta::minutesundefined```
#### ```int xlnt::timedelta::secondsundefined```
#### ```int xlnt::timedelta::microsecondsundefined```
#### ```static timedelta xlnt::timedelta::from_number(long double number)```
#### ```xlnt::timedelta::timedelta()```
#### ```xlnt::timedelta::timedelta(int days_, int hours_, int minutes_, int seconds_, int microseconds_)```
#### ```long double xlnt::timedelta::to_number() const```
2017-01-19 21:37:40 +08:00
### variant
2017-01-27 08:57:19 +08:00
#### ```undefinedundefined```
2017-03-23 09:43:25 +08:00
The possible types a variant can hold.
2017-01-27 08:57:19 +08:00
#### ```xlnt::variant::variant()```
2017-03-23 09:43:25 +08:00
Default constructor. Creates a null-type variant.
2017-01-27 08:57:19 +08:00
#### ```xlnt::variant::variant(const std::string &value)```
2017-03-23 09:43:25 +08:00
Creates a string-type variant with the given value.
2017-01-27 08:57:19 +08:00
#### ```xlnt::variant::variant(const char *value)```
2017-03-23 09:43:25 +08:00
Creates a string-type variant with the given value.
2017-01-27 08:57:19 +08:00
#### ```xlnt::variant::variant(int value)```
2017-03-23 09:43:25 +08:00
Creates a i4-type variant with the given value.
2017-01-27 08:57:19 +08:00
#### ```xlnt::variant::variant(bool value)```
2017-03-23 09:43:25 +08:00
Creates a bool-type variant with the given value.
2017-01-27 08:57:19 +08:00
#### ```xlnt::variant::variant(const datetime &value)```
2017-03-23 09:43:25 +08:00
Creates a date-type variant with the given value.
2017-01-27 08:57:19 +08:00
#### ```xlnt::variant::variant(const std::initializer_list< int > &value)```
2017-03-23 09:43:25 +08:00
Creates a vector_i4-type variant with the given value.
2017-01-27 08:57:19 +08:00
#### ```xlnt::variant::variant(const std::vector< int > &value)```
2017-03-23 09:43:25 +08:00
Creates a vector_i4-type variant with the given value.
2017-01-27 08:57:19 +08:00
#### ```xlnt::variant::variant(const std::initializer_list< const char *> &value)```
2017-03-23 09:43:25 +08:00
Creates a vector_string-type variant with the given value.
2017-01-27 08:57:19 +08:00
#### ```xlnt::variant::variant(const std::vector< const char *> &value)```
2017-03-23 09:43:25 +08:00
Creates a vector_string-type variant with the given value.
2017-01-27 08:57:19 +08:00
#### ```xlnt::variant::variant(const std::initializer_list< std::string > &value)```
2017-03-23 09:43:25 +08:00
Creates a vector_string-type variant with the given value.
2017-01-27 08:57:19 +08:00
#### ```xlnt::variant::variant(const std::vector< std::string > &value)```
2017-03-23 09:43:25 +08:00
Creates a vector_string-type variant with the given value.
2017-01-27 08:57:19 +08:00
#### ```xlnt::variant::variant(const std::vector< variant > &value)```
2017-03-23 09:43:25 +08:00
Creates a vector_variant-type variant with the given value.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::variant::is(type t) const```
2017-03-23 09:43:25 +08:00
Returns true if this variant is of type t.
2017-01-27 08:57:19 +08:00
#### ```T xlnt::variant::get() const```
2017-03-23 09:43:25 +08:00
Returns the value of this variant as type T. An exception will be thrown if the types are not convertible.
2017-01-27 08:57:19 +08:00
#### ```type xlnt::variant::value_type() const```
2017-03-23 09:43:25 +08:00
Returns the type of this variant.
2017-01-19 21:37:40 +08:00
## Workbook Module
### calculation_properties
2017-01-27 08:57:19 +08:00
#### ```std::size_t xlnt::calculation_properties::calc_idundefined```
2017-03-23 09:43:25 +08:00
The version of calculation engine used to calculate cell formula values. If this is older than the version of the Excel calculation engine opening the workbook, cell values will be recalculated.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::calculation_properties::concurrent_calcundefined```
2017-03-23 09:43:25 +08:00
If this is true, concurrent calculation will be enabled for the workbook.
2017-01-19 21:37:40 +08:00
### document_security
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::document_security::lock_revisionundefined```
2017-03-23 09:43:25 +08:00
If true, the workbook is locked for revisions.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::document_security::lock_structureundefined```
2017-03-23 09:43:25 +08:00
If true, worksheets can't be moved, renamed, (un)hidden, inserted, or deleted.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::document_security::lock_windowsundefined```
2017-03-23 09:43:25 +08:00
If true, workbook windows will be opened at the same position with the same size every time they are loaded.
#### ```lock_verifier xlnt::document_security::revision_lockundefined```
The settings to allow the revision lock to be removed.
#### ```lock_verifier xlnt::document_security::workbook_lockundefined```
The settings to allow the structure and windows lock to be removed.
2017-01-27 08:57:19 +08:00
#### ```xlnt::document_security::document_security()```
2017-03-23 09:43:25 +08:00
Constructs a new document security object with default values.
### lock_verifier
#### ```std::string xlnt::document_security::lock_verifier::hash_algorithmundefined```
#### ```std::string xlnt::document_security::lock_verifier::saltundefined```
#### ```std::string xlnt::document_security::lock_verifier::hashundefined```
#### ```std::size_t xlnt::document_security::lock_verifier::spin_countundefined```
2017-01-19 21:37:40 +08:00
### external_book
### named_range
2017-01-27 08:57:19 +08:00
#### ```using xlnt::named_range::target = std::pair<worksheet, range_reference>undefined```
2017-03-23 09:43:25 +08:00
Type alias for the combination of sheet and range this named_range points to.
2017-01-27 08:57:19 +08:00
#### ```xlnt::named_range::named_range()```
2017-03-23 09:43:25 +08:00
Constructs a named range that has no name and has no targets.
2017-01-27 08:57:19 +08:00
#### ```xlnt::named_range::named_range(const named_range &other)```
2017-03-23 09:43:25 +08:00
Constructs a named range by copying its name and targets from other.
2017-01-27 08:57:19 +08:00
#### ```xlnt::named_range::named_range(const std::string &name, const std::vector< target > &targets)```
2017-03-23 09:43:25 +08:00
Constructs a named range with the given name and targets.
2017-01-27 08:57:19 +08:00
#### ```std::string xlnt::named_range::name() const```
2017-03-23 09:43:25 +08:00
Returns the name of this range.
2017-01-27 08:57:19 +08:00
#### ```const std::vector<target>& xlnt::named_range::targets() const```
2017-03-23 09:43:25 +08:00
Returns the set of targets of this named range as a vector.
2017-01-27 08:57:19 +08:00
#### ```named_range& xlnt::named_range::operator=(const named_range &other)```
2017-03-23 09:43:25 +08:00
Assigns the name and targets of this named_range to that of other.
2017-01-19 21:37:40 +08:00
### theme
### workbook
2017-01-27 08:57:19 +08:00
#### ```using xlnt::workbook::iterator = worksheet_iteratorundefined```
typedef for the iterator used for iterating through this workbook (non-const) in a range-based for loop.
#### ```using xlnt::workbook::const_iterator = const_worksheet_iteratorundefined```
typedef for the iterator used for iterating through this workbook (const) in a range-based for loop.
#### ```using xlnt::workbook::reverse_iterator = std::reverse_iterator<iterator>undefined```
typedef for the iterator used for iterating through this workbook (non-const) in a range-based for loop in reverse order using std::make_reverse_iterator.
#### ```using xlnt::workbook::const_reverse_iterator = std::reverse_iterator<const_iterator>undefined```
typedef for the iterator used for iterating through this workbook (const) in a range-based for loop in reverse order using std::make_reverse_iterator.
#### ```friend class detail::xlsx_consumerundefined```
#### ```friend class detail::xlsx_producerundefined```
#### ```static workbook xlnt::workbook::empty()```
Constructs and returns an empty workbook similar to a default. Excel workbook
#### ```xlnt::workbook::workbook()```
Default constructor. Constructs a workbook containing a single empty worksheet using workbook::empty().
#### ```xlnt::workbook::workbook(workbook &&other)```
Move constructor. Constructs a workbook from existing workbook, other.
#### ```xlnt::workbook::workbook(const workbook &other)```
Copy constructor. Constructs this workbook from existing workbook, other.
#### ```xlnt::workbook::~workbook()```
Destroys this workbook, deallocating all internal storage space. Any pimpl wrapper classes (e.g. cell) pointing into this workbook will be invalid after this is executed.
#### ```worksheet xlnt::workbook::create_sheet()```
Creates and returns a sheet after the last sheet in this workbook.
#### ```worksheet xlnt::workbook::create_sheet(std::size_t index)```
Creates and returns a sheet at the specified index.
#### ```worksheet xlnt::workbook::create_sheet_with_rel(const std::string &title, const relationship &rel)```
TODO: This should be private...
#### ```worksheet xlnt::workbook::copy_sheet(worksheet worksheet)```
Creates and returns a new sheet after the last sheet initializing it with all of the data from the provided worksheet.
#### ```worksheet xlnt::workbook::copy_sheet(worksheet worksheet, std::size_t index)```
Creates and returns a new sheet at the specified index initializing it with all of the data from the provided worksheet.
#### ```worksheet xlnt::workbook::active_sheet()```
Returns the worksheet that is determined to be active. An active sheet is that which is initially shown by the spreadsheet editor.
#### ```worksheet xlnt::workbook::sheet_by_title(const std::string &title)```
Returns the worksheet with the given name. This may throw an exception if the sheet isn't found. Use workbook::contains(const std::string & ) to make sure the sheet exists before calling this method.
#### ```const worksheet xlnt::workbook::sheet_by_title(const std::string &title) const```
Returns the worksheet with the given name. This may throw an exception if the sheet isn't found. Use workbook::contains(const std::string & ) to make sure the sheet exists before calling this method.
#### ```worksheet xlnt::workbook::sheet_by_index(std::size_t index)```
Returns the worksheet at the given index. This will throw an exception if index is greater than or equal to the number of sheets in this workbook.
#### ```const worksheet xlnt::workbook::sheet_by_index(std::size_t index) const```
Returns the worksheet at the given index. This will throw an exception if index is greater than or equal to the number of sheets in this workbook.
#### ```worksheet xlnt::workbook::sheet_by_id(std::size_t id)```
Returns the worksheet with a sheetId of id. Sheet IDs are arbitrary numbers that uniquely identify a sheet. Most users won't need this.
#### ```const worksheet xlnt::workbook::sheet_by_id(std::size_t id) const```
Returns the worksheet with a sheetId of id. Sheet IDs are arbitrary numbers that uniquely identify a sheet. Most users won't need this.
#### ```bool xlnt::workbook::contains(const std::string &title) const```
Returns true if this workbook contains a sheet with the given title.
#### ```std::size_t xlnt::workbook::index(worksheet worksheet)```
Returns the index of the given worksheet. The worksheet must be owned by this workbook.
#### ```void xlnt::workbook::remove_sheet(worksheet worksheet)```
Removes the given worksheet from this workbook.
#### ```void xlnt::workbook::clear()```
Sets the contents of this workbook to be equivalent to that of a workbook returned by workbook::empty().
#### ```iterator xlnt::workbook::begin()```
2017-01-19 21:37:40 +08:00
Returns an iterator to the first worksheet in this workbook.
2017-01-27 08:57:19 +08:00
#### ```iterator xlnt::workbook::end()```
2017-01-19 21:37:40 +08:00
Returns an iterator to the worksheet following the last worksheet of the workbook. This worksheet acts as a placeholder; attempting to access it will cause an exception to be thrown.
2017-01-27 08:57:19 +08:00
#### ```const_iterator xlnt::workbook::begin() const```
2017-01-19 21:37:40 +08:00
Returns a const iterator to the first worksheet in this workbook.
2017-01-27 08:57:19 +08:00
#### ```const_iterator xlnt::workbook::end() const```
2017-01-19 21:37:40 +08:00
Returns a const iterator to the worksheet following the last worksheet of the workbook. This worksheet acts as a placeholder; attempting to access it will cause an exception to be thrown.
2017-01-27 08:57:19 +08:00
#### ```const_iterator xlnt::workbook::cbegin() const```
2017-01-19 21:37:40 +08:00
Returns an iterator to the first worksheet in this workbook.
2017-01-27 08:57:19 +08:00
#### ```const_iterator xlnt::workbook::cend() const```
2017-01-19 21:37:40 +08:00
Returns a const iterator to the worksheet following the last worksheet of the workbook. This worksheet acts as a placeholder; attempting to access it will cause an exception to be thrown.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::workbook::apply_to_cells(std::function< void(cell)> f)```
Applies the function "f" to every non-empty cell in every worksheet in this workbook.
#### ```std::vector<std::string> xlnt::workbook::sheet_titles() const```
2017-01-19 21:37:40 +08:00
Returns a temporary vector containing the titles of each sheet in the order of the sheets in the workbook.
2017-01-27 08:57:19 +08:00
#### ```std::size_t xlnt::workbook::sheet_count() const```
2017-01-19 21:37:40 +08:00
Returns the number of sheets in this workbook.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::workbook::has_core_property(xlnt::core_property type) const```
2017-01-19 21:37:40 +08:00
Returns true if the workbook has the core property with the given name.
2017-01-27 08:57:19 +08:00
#### ```std::vector<xlnt::core_property> xlnt::workbook::core_properties() const```
Returns a vector of the type of each core property that is set to a particular value in this workbook.
#### ```variant xlnt::workbook::core_property(xlnt::core_property type) const```
Returns the value of the given core property.
#### ```void xlnt::workbook::core_property(xlnt::core_property type, const variant &value)```
Sets the given core property to the provided value.
#### ```bool xlnt::workbook::has_extended_property(xlnt::extended_property type) const```
2017-01-19 21:37:40 +08:00
Returns true if the workbook has the extended property with the given name.
2017-01-27 08:57:19 +08:00
#### ```std::vector<xlnt::extended_property> xlnt::workbook::extended_properties() const```
Returns a vector of the type of each extended property that is set to a particular value in this workbook.
#### ```variant xlnt::workbook::extended_property(xlnt::extended_property type) const```
Returns the value of the given extended property.
#### ```void xlnt::workbook::extended_property(xlnt::extended_property type, const variant &value)```
Sets the given extended property to the provided value.
#### ```bool xlnt::workbook::has_custom_property(const std::string &property_name) const```
2017-01-19 21:37:40 +08:00
Returns true if the workbook has the custom property with the given name.
2017-01-27 08:57:19 +08:00
#### ```std::vector<std::string> xlnt::workbook::custom_properties() const```
Returns a vector of the name of each custom property that is set to a particular value in this workbook.
#### ```variant xlnt::workbook::custom_property(const std::string &property_name) const```
Returns the value of the given custom property.
#### ```void xlnt::workbook::custom_property(const std::string &property_name, const variant &value)```
Creates a new custom property in this workbook and sets it to the provided value.
#### ```calendar xlnt::workbook::base_date() const```
Returns the base date used by this workbook. This will generally be windows_1900 except on Apple based systems when it will default to mac_1904 unless otherwise set via void workbook::base_date(calendar base_date).
#### ```void xlnt::workbook::base_date(calendar base_date)```
Sets the base date style of this workbook. This is the date and time that a numeric value of 0 represents.
#### ```bool xlnt::workbook::has_title() const```
Returns true if this workbook has had its title set.
#### ```std::string xlnt::workbook::title() const```
Returns the title of this workbook.
#### ```void xlnt::workbook::title(const std::string &title)```
Sets the title of this workbook to title.
#### ```std::vector<xlnt::named_range> xlnt::workbook::named_ranges() const```
Returns a vector of the named ranges in this workbook.
#### ```void xlnt::workbook::create_named_range(const std::string &name, worksheet worksheet, const range_reference &reference)```
Creates a new names range.
#### ```void xlnt::workbook::create_named_range(const std::string &name, worksheet worksheet, const std::string &reference_string)```
Creates a new names range.
#### ```bool xlnt::workbook::has_named_range(const std::string &name) const```
Returns true if a named range of the given name exists in the workbook.
#### ```class range xlnt::workbook::named_range(const std::string &name)```
Returns the named range with the given name.
#### ```void xlnt::workbook::remove_named_range(const std::string &name)```
Deletes the named range with the given name.
#### ```void xlnt::workbook::save(std::vector< std::uint8_t > &data) const```
Serializes the workbook into an XLSX file and saves the bytes into byte vector data.
#### ```void xlnt::workbook::save(std::vector< std::uint8_t > &data, const std::string &password) const```
Serializes the workbook into an XLSX file encrypted with the given password and saves the bytes into byte vector data.
#### ```void xlnt::workbook::save(const std::string &filename) const```
Serializes the workbook into an XLSX file and saves the data into a file named filename.
2017-03-23 09:43:25 +08:00
#### ```void xlnt::workbook::save(const std::string &filename, const std::string &password) const```
2017-01-27 08:57:19 +08:00
Serializes the workbook into an XLSX file encrypted with the given password and loads the bytes into a file named filename.
#### ```void xlnt::workbook::save(const xlnt::path &filename) const```
Serializes the workbook into an XLSX file and saves the data into a file named filename.
2017-03-23 09:43:25 +08:00
#### ```void xlnt::workbook::save(const xlnt::path &filename, const std::string &password) const```
2017-01-27 08:57:19 +08:00
Serializes the workbook into an XLSX file encrypted with the given password and loads the bytes into a file named filename.
#### ```void xlnt::workbook::save(std::ostream &stream) const```
Serializes the workbook into an XLSX file and saves the data into stream.
2017-03-23 09:43:25 +08:00
#### ```void xlnt::workbook::save(std::ostream &stream, const std::string &password) const```
2017-01-27 08:57:19 +08:00
Serializes the workbook into an XLSX file encrypted with the given password and loads the bytes into the given stream.
#### ```void xlnt::workbook::load(const std::vector< std::uint8_t > &data)```
Interprets byte vector data as an XLSX file and sets the content of this workbook to match that file.
#### ```void xlnt::workbook::load(const std::vector< std::uint8_t > &data, const std::string &password)```
Interprets byte vector data as an XLSX file encrypted with the given password and sets the content of this workbook to match that file.
#### ```void xlnt::workbook::load(const std::string &filename)```
Interprets file with the given filename as an XLSX file and sets the content of this workbook to match that file.
#### ```void xlnt::workbook::load(const std::string &filename, const std::string &password)```
Interprets file with the given filename as an XLSX file encrypted with the given password and sets the content of this workbook to match that file.
#### ```void xlnt::workbook::load(const xlnt::path &filename)```
Interprets file with the given filename as an XLSX file and sets the content of this workbook to match that file.
#### ```void xlnt::workbook::load(const xlnt::path &filename, const std::string &password)```
Interprets file with the given filename as an XLSX file encrypted with the given password and sets the content of this workbook to match that file.
#### ```void xlnt::workbook::load(std::istream &stream)```
Interprets data in stream as an XLSX file and sets the content of this workbook to match that file.
#### ```void xlnt::workbook::load(std::istream &stream, const std::string &password)```
Interprets data in stream as an XLSX file encrypted with the given password and sets the content of this workbook to match that file.
#### ```bool xlnt::workbook::has_view() const```
Returns true if this workbook has a view.
#### ```workbook_view xlnt::workbook::view() const```
Returns the view.
#### ```void xlnt::workbook::view(const workbook_view &view)```
Sets the view to view.
#### ```bool xlnt::workbook::has_code_name() const```
Returns true if a code name has been set for this workbook.
#### ```std::string xlnt::workbook::code_name() const```
Returns the code name that was set for this workbook.
#### ```void xlnt::workbook::code_name(const std::string &code_name)```
Sets the code name of this workbook to code_name.
#### ```bool xlnt::workbook::has_file_version() const```
Returns true if this workbook has a file version.
#### ```std::string xlnt::workbook::app_name() const```
Returns the AppName workbook file property.
#### ```std::size_t xlnt::workbook::last_edited() const```
Returns the LastEdited workbook file property.
#### ```std::size_t xlnt::workbook::lowest_edited() const```
Returns the LowestEdited workbook file property.
#### ```std::size_t xlnt::workbook::rup_build() const```
Returns the RupBuild workbook file property.
#### ```bool xlnt::workbook::has_theme() const```
Returns true if this workbook has a theme defined.
#### ```const xlnt::theme& xlnt::workbook::theme() const```
Returns a const reference to this workbook's theme.
#### ```void xlnt::workbook::theme(const class theme &value)```
Sets the theme to value.
#### ```xlnt::format xlnt::workbook::format(std::size_t format_index)```
Returns the cell format at the given index. The index is the position of the format in xl/styles.xml.
#### ```const xlnt::format xlnt::workbook::format(std::size_t format_index) const```
Returns the cell format at the given index. The index is the position of the format in xl/styles.xml.
#### ```xlnt::format xlnt::workbook::create_format(bool default_format=false)```
Creates a new format and returns it.
#### ```void xlnt::workbook::clear_formats()```
Clear all cell-level formatting and formats from the styelsheet. This leaves all other styling in place (e.g. named styles).
#### ```bool xlnt::workbook::has_style(const std::string &name) const```
Returns true if this workbook has a style with a name of name.
#### ```class style xlnt::workbook::style(const std::string &name)```
Returns the named style with the given name.
#### ```const class style xlnt::workbook::style(const std::string &name) const```
Returns the named style with the given name.
#### ```class style xlnt::workbook::create_style(const std::string &name)```
Creates a new style and returns it.
#### ```void xlnt::workbook::clear_styles()```
Clear all named styles from cells and remove the styles from from the styelsheet. This leaves all other styling in place (e.g. cell formats).
#### ```class manifest& xlnt::workbook::manifest()```
Returns a reference to the workbook's internal manifest.
#### ```const class manifest& xlnt::workbook::manifest() const```
Returns a reference to the workbook's internal manifest.
#### ```void xlnt::workbook::add_shared_string(const rich_text &shared, bool allow_duplicates=false)```
Append a shared string to the shared string collection in this workbook. This should not generally be called unless you know what you're doing. If allow_duplicates is false and the string is already in the collection, it will not be added.
#### ```std::vector<rich_text>& xlnt::workbook::shared_strings()```
Returns a reference to the shared strings being used by cells in this workbook.
#### ```const std::vector<rich_text>& xlnt::workbook::shared_strings() const```
Returns a reference to the shared strings being used by cells in this workbook.
#### ```void xlnt::workbook::thumbnail(const std::vector< std::uint8_t > &thumbnail, const std::string &extension, const std::string &content_type)```
Sets the workbook's thumbnail to the given vector of bytes, thumbnail, with the given extension (e.g. jpg) and content_type (e.g. image/jpeg).
#### ```const std::vector<std::uint8_t>& xlnt::workbook::thumbnail() const```
Returns a vector of bytes representing the workbook's thumbnail.
#### ```bool xlnt::workbook::has_calculation_properties() const```
Returns true if this workbook has any calculation properties set.
#### ```class calculation_properties xlnt::workbook::calculation_properties() const```
Returns the calculation properties used in this workbook.
#### ```void xlnt::workbook::calculation_properties(const class calculation_properties &props)```
Sets the calculation properties of this workbook to props.
#### ```workbook& xlnt::workbook::operator=(workbook other)```
2017-01-19 21:37:40 +08:00
Set the contents of this workbook to be equal to those of "other". Other is passed as value to allow for copy-swap idiom.
2017-01-27 08:57:19 +08:00
#### ```worksheet xlnt::workbook::operator[](const std::string &name)```
2017-01-19 21:37:40 +08:00
Return the worksheet with a title of "name".
2017-01-27 08:57:19 +08:00
#### ```worksheet xlnt::workbook::operator[](std::size_t index)```
2017-01-19 21:37:40 +08:00
Return the worksheet at "index".
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::workbook::operator==(const workbook &rhs) const```
2017-01-19 21:37:40 +08:00
Return true if this workbook internal implementation points to the same memory as rhs's.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::workbook::operator!=(const workbook &rhs) const```
2017-01-19 21:37:40 +08:00
Return true if this workbook internal implementation doesn't point to the same memory as rhs's.
### workbook_view
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::workbook_view::auto_filter_date_groupingundefined```
2017-03-23 09:43:25 +08:00
If true, dates will be grouped when presenting the user with filtering options.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::workbook_view::minimizedundefined```
2017-03-23 09:43:25 +08:00
If true, the view will be minimized.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::workbook_view::show_horizontal_scrollundefined```
2017-03-23 09:43:25 +08:00
If true, the horizontal scroll bar will be displayed.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::workbook_view::show_sheet_tabsundefined```
2017-03-23 09:43:25 +08:00
If true, the sheet tabs will be displayed.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::workbook_view::show_vertical_scrollundefined```
2017-03-23 09:43:25 +08:00
If true, the vertical scroll bar will be displayed.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::workbook_view::visibleundefined```
2017-03-23 09:43:25 +08:00
If true, the workbook window will be visible.
2017-01-27 08:57:19 +08:00
#### ```optional<std::size_t> xlnt::workbook_view::active_tabundefined```
2017-03-23 09:43:25 +08:00
The optional index to the active sheet in this view.
2017-01-27 08:57:19 +08:00
#### ```optional<std::size_t> xlnt::workbook_view::first_sheetundefined```
2017-03-23 09:43:25 +08:00
The optional index to the first sheet in this view.
2017-01-27 08:57:19 +08:00
#### ```optional<std::size_t> xlnt::workbook_view::tab_ratioundefined```
2017-03-23 09:43:25 +08:00
The optional ratio between the tabs bar and the horizontal scroll bar.
2017-01-27 08:57:19 +08:00
#### ```optional<std::size_t> xlnt::workbook_view::window_widthundefined```
2017-03-23 09:43:25 +08:00
The width of the workbook window in twips.
2017-01-27 08:57:19 +08:00
#### ```optional<std::size_t> xlnt::workbook_view::window_heightundefined```
2017-03-23 09:43:25 +08:00
The height of the workbook window in twips.
2017-01-27 08:57:19 +08:00
#### ```optional<std::size_t> xlnt::workbook_view::x_windowundefined```
2017-03-23 09:43:25 +08:00
The distance of the workbook window from the left side of the screen in twips.
2017-01-27 08:57:19 +08:00
#### ```optional<std::size_t> xlnt::workbook_view::y_windowundefined```
2017-03-23 09:43:25 +08:00
The distance of the workbook window from the top of the screen in twips.
2017-01-19 21:37:40 +08:00
### worksheet_iterator
2017-01-27 08:57:19 +08:00
#### ```xlnt::worksheet_iterator::worksheet_iterator(workbook &wb, std::size_t index)```
2017-03-23 09:43:25 +08:00
Constructs a worksheet iterator from a workbook and sheet index.
2017-01-27 08:57:19 +08:00
#### ```xlnt::worksheet_iterator::worksheet_iterator(const worksheet_iterator &)```
2017-03-23 09:43:25 +08:00
Copy constructs a worksheet iterator from another iterator.
2017-01-27 08:57:19 +08:00
#### ```worksheet_iterator& xlnt::worksheet_iterator::operator=(const worksheet_iterator &)```
2017-03-23 09:43:25 +08:00
Assigns the iterator so that it points to the same worksheet in the same workbook.
2017-01-27 08:57:19 +08:00
#### ```worksheet xlnt::worksheet_iterator::operator*()```
2017-03-23 09:43:25 +08:00
Dereferences the iterator to return the worksheet it is pointing to. If the iterator points to one-past-the-end of the workbook, an invalid_parameter exception will be thrown.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::worksheet_iterator::operator==(const worksheet_iterator &comparand) const```
2017-03-23 09:43:25 +08:00
Returns true if this iterator points to the same worksheet as comparand.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::worksheet_iterator::operator!=(const worksheet_iterator &comparand) const```
2017-03-23 09:43:25 +08:00
Returns true if this iterator doesn't point to the same worksheet as comparand.
2017-01-27 08:57:19 +08:00
#### ```worksheet_iterator xlnt::worksheet_iterator::operator++(int)```
2017-03-23 09:43:25 +08:00
Post-increment the iterator's internal workseet index. Returns a copy of the iterator as it was before being incremented.
2017-01-27 08:57:19 +08:00
#### ```worksheet_iterator& xlnt::worksheet_iterator::operator++()```
2017-03-23 09:43:25 +08:00
Pre-increment the iterator's internal workseet index. Returns a refernce to the same iterator.
### const_worksheet_iterator
#### ```xlnt::const_worksheet_iterator::const_worksheet_iterator(const workbook &wb, std::size_t index)```
Constructs a worksheet iterator from a workbook and sheet index.
#### ```xlnt::const_worksheet_iterator::const_worksheet_iterator(const const_worksheet_iterator &)```
Copy constructs a worksheet iterator from another iterator.
#### ```const_worksheet_iterator& xlnt::const_worksheet_iterator::operator=(const const_worksheet_iterator &)```
Assigns the iterator so that it points to the same worksheet in the same workbook.
#### ```const worksheet xlnt::const_worksheet_iterator::operator*()```
Dereferences the iterator to return the worksheet it is pointing to. If the iterator points to one-past-the-end of the workbook, an invalid_parameter exception will be thrown.
#### ```bool xlnt::const_worksheet_iterator::operator==(const const_worksheet_iterator &comparand) const```
Returns true if this iterator points to the same worksheet as comparand.
#### ```bool xlnt::const_worksheet_iterator::operator!=(const const_worksheet_iterator &comparand) const```
Returns true if this iterator doesn't point to the same worksheet as comparand.
#### ```const_worksheet_iterator xlnt::const_worksheet_iterator::operator++(int)```
Post-increment the iterator's internal workseet index. Returns a copy of the iterator as it was before being incremented.
#### ```const_worksheet_iterator& xlnt::const_worksheet_iterator::operator++()```
Pre-increment the iterator's internal workseet index. Returns a refernce to the same iterator.
2017-01-19 21:37:40 +08:00
## Worksheet Module
### cell_iterator
2017-03-24 08:05:25 +08:00
#### ```xlnt::cell_iterator::cell_iterator(worksheet ws, const cell_reference &start_cell, const range_reference &limits, major_order order, bool skip_null, bool wrap)```
Constructs a cell_iterator from a worksheet, range, and iteration settings.
2017-01-27 08:57:19 +08:00
#### ```xlnt::cell_iterator::cell_iterator(const cell_iterator &other)```
2017-03-24 08:05:25 +08:00
Constructs a cell_iterator as a copy of an existing cell_iterator.
#### ```cell_iterator& xlnt::cell_iterator::operator=(const cell_iterator &rhs)=default```
Assigns this iterator to match the data in rhs.
2017-01-27 08:57:19 +08:00
#### ```cell xlnt::cell_iterator::operator*()```
2017-03-24 08:05:25 +08:00
Dereferences this iterator to return the cell it points to.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::cell_iterator::operator==(const cell_iterator &other) const```
2017-03-24 08:05:25 +08:00
Returns true if this iterator is equivalent to other.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::cell_iterator::operator!=(const cell_iterator &other) const```
2017-03-24 08:05:25 +08:00
Returns true if this iterator isn't equivalent to other.
2017-01-27 08:57:19 +08:00
#### ```cell_iterator& xlnt::cell_iterator::operator--()```
2017-03-24 08:05:25 +08:00
Pre-decrements the iterator to point to the previous cell and returns a reference to the iterator.
2017-01-27 08:57:19 +08:00
#### ```cell_iterator xlnt::cell_iterator::operator--(int)```
2017-03-24 08:05:25 +08:00
Post-decrements the iterator to point to the previous cell and return a copy of the iterator before the decrement.
2017-01-27 08:57:19 +08:00
#### ```cell_iterator& xlnt::cell_iterator::operator++()```
2017-03-24 08:05:25 +08:00
Pre-increments the iterator to point to the previous cell and returns a reference to the iterator.
2017-01-27 08:57:19 +08:00
#### ```cell_iterator xlnt::cell_iterator::operator++(int)```
2017-03-24 08:05:25 +08:00
Post-increments the iterator to point to the previous cell and return a copy of the iterator before the decrement.
2017-03-23 09:43:25 +08:00
### const_cell_iterator
2017-03-24 08:05:25 +08:00
#### ```xlnt::const_cell_iterator::const_cell_iterator(worksheet ws, const cell_reference &start_cell, const range_reference &limits, major_order order, bool skip_null, bool wrap)```
Constructs a cell_iterator from a worksheet, range, and iteration settings.
2017-03-23 09:43:25 +08:00
#### ```xlnt::const_cell_iterator::const_cell_iterator(const const_cell_iterator &other)```
2017-03-24 08:05:25 +08:00
Constructs a cell_iterator as a copy of an existing cell_iterator.
2017-03-23 09:43:25 +08:00
#### ```const_cell_iterator& xlnt::const_cell_iterator::operator=(const const_cell_iterator &)=default```
2017-03-24 08:05:25 +08:00
Assigns this iterator to match the data in rhs.
2017-03-23 09:43:25 +08:00
#### ```const cell xlnt::const_cell_iterator::operator*() const```
2017-03-24 08:05:25 +08:00
Dereferences this iterator to return the cell it points to.
2017-03-23 09:43:25 +08:00
#### ```bool xlnt::const_cell_iterator::operator==(const const_cell_iterator &other) const```
2017-03-24 08:05:25 +08:00
Returns true if this iterator is equivalent to other.
2017-03-23 09:43:25 +08:00
#### ```bool xlnt::const_cell_iterator::operator!=(const const_cell_iterator &other) const```
2017-03-24 08:05:25 +08:00
Returns true if this iterator isn't equivalent to other.
2017-03-23 09:43:25 +08:00
#### ```const_cell_iterator& xlnt::const_cell_iterator::operator--()```
2017-03-24 08:05:25 +08:00
Pre-decrements the iterator to point to the previous cell and returns a reference to the iterator.
2017-03-23 09:43:25 +08:00
#### ```const_cell_iterator xlnt::const_cell_iterator::operator--(int)```
2017-03-24 08:05:25 +08:00
Post-decrements the iterator to point to the previous cell and return a copy of the iterator before the decrement.
2017-03-23 09:43:25 +08:00
#### ```const_cell_iterator& xlnt::const_cell_iterator::operator++()```
2017-03-24 08:05:25 +08:00
Pre-increments the iterator to point to the previous cell and returns a reference to the iterator.
2017-03-23 09:43:25 +08:00
#### ```const_cell_iterator xlnt::const_cell_iterator::operator++(int)```
2017-03-24 08:05:25 +08:00
Post-increments the iterator to point to the previous cell and return a copy of the iterator before the decrement.
2017-01-19 21:37:40 +08:00
### cell_vector
2017-01-27 08:57:19 +08:00
#### ```using xlnt::cell_vector::iterator = cell_iteratorundefined```
2017-03-24 08:05:25 +08:00
Iterate over cells in a cell_vector with an iterator of this type.
2017-01-27 08:57:19 +08:00
#### ```using xlnt::cell_vector::const_iterator = const_cell_iteratorundefined```
2017-03-24 08:05:25 +08:00
Iterate over const cells in a const cell_vector with an iterator of this type.
2017-01-27 08:57:19 +08:00
#### ```using xlnt::cell_vector::reverse_iterator = std::reverse_iterator<iterator>undefined```
2017-03-24 08:05:25 +08:00
Iterate over cells in a cell_vector in reverse oreder with an iterator of this type.
2017-01-27 08:57:19 +08:00
#### ```using xlnt::cell_vector::const_reverse_iterator = std::reverse_iterator<const_iterator>undefined```
2017-03-24 08:05:25 +08:00
Iterate over const cells in a const cell_vector in reverse order with an iterator of this type.
#### ```xlnt::cell_vector::cell_vector(worksheet ws, const cell_reference &cursor, const range_reference &ref, major_order order, bool skip_null, bool wrap)```
Constructs a cell vector pointing to a given range in a given worksheet. order determines whether this vector is a row or a column. If skip_null is true, iterating over this vector will skip empty cells.
#### ```bool xlnt::cell_vector::empty() const```
Returns true if every cell in this vector is null (i.e. the cell doesn't exist in the worksheet).
2017-01-27 08:57:19 +08:00
#### ```cell xlnt::cell_vector::front()```
2017-03-24 08:05:25 +08:00
Returns the first cell in this vector.
2017-01-27 08:57:19 +08:00
#### ```const cell xlnt::cell_vector::front() const```
2017-03-24 08:05:25 +08:00
Returns the first cell in this vector.
2017-01-27 08:57:19 +08:00
#### ```cell xlnt::cell_vector::back()```
2017-03-24 08:05:25 +08:00
Returns the last cell in this vector.
2017-01-27 08:57:19 +08:00
#### ```const cell xlnt::cell_vector::back() const```
2017-03-24 08:05:25 +08:00
Returns the last cell in this vector.
2017-01-27 08:57:19 +08:00
#### ```std::size_t xlnt::cell_vector::length() const```
2017-03-24 08:05:25 +08:00
Returns the distance between the first and last cells in this vector.
2017-01-27 08:57:19 +08:00
#### ```iterator xlnt::cell_vector::begin()```
2017-03-24 08:05:25 +08:00
Returns an iterator to the first cell in this vector.
2017-01-27 08:57:19 +08:00
#### ```iterator xlnt::cell_vector::end()```
2017-03-24 08:05:25 +08:00
Returns an iterator to a cell one-past-the-end of this vector.
2017-01-27 08:57:19 +08:00
#### ```const_iterator xlnt::cell_vector::begin() const```
2017-03-24 08:05:25 +08:00
Returns an iterator to the first cell in this vector.
2017-01-27 08:57:19 +08:00
#### ```const_iterator xlnt::cell_vector::cbegin() const```
2017-03-24 08:05:25 +08:00
Returns an iterator to the first cell in this vector.
2017-01-27 08:57:19 +08:00
#### ```const_iterator xlnt::cell_vector::end() const```
2017-03-24 08:05:25 +08:00
Returns an iterator to a cell one-past-the-end of this vector.
2017-01-27 08:57:19 +08:00
#### ```const_iterator xlnt::cell_vector::cend() const```
2017-03-24 08:05:25 +08:00
Returns an iterator to a cell one-past-the-end of this vector.
2017-01-27 08:57:19 +08:00
#### ```reverse_iterator xlnt::cell_vector::rbegin()```
2017-03-24 08:05:25 +08:00
Returns a reverse iterator to the first cell of this reversed vector.
2017-01-27 08:57:19 +08:00
#### ```reverse_iterator xlnt::cell_vector::rend()```
2017-03-24 08:05:25 +08:00
Returns a reverse iterator to to a cell one-past-the-end of this reversed vector.
2017-01-27 08:57:19 +08:00
#### ```const_reverse_iterator xlnt::cell_vector::rbegin() const```
2017-03-24 08:05:25 +08:00
Returns a reverse iterator to the first cell of this reversed vector.
2017-01-27 08:57:19 +08:00
#### ```const_reverse_iterator xlnt::cell_vector::rend() const```
2017-03-24 08:05:25 +08:00
Returns a reverse iterator to to a cell one-past-the-end of this reversed vector.
2017-01-27 08:57:19 +08:00
#### ```const_reverse_iterator xlnt::cell_vector::crbegin() const```
2017-03-24 08:05:25 +08:00
Returns a reverse iterator to the first cell of this reversed vector.
2017-01-27 08:57:19 +08:00
#### ```const_reverse_iterator xlnt::cell_vector::crend() const```
2017-03-24 08:05:25 +08:00
Returns a reverse iterator to to a cell one-past-the-end of this reversed vector.
#### ```cell xlnt::cell_vector::operator[](std::size_t column_index)```
Returns the cell column_index distance away from the first cell in this vector.
#### ```const cell xlnt::cell_vector::operator[](std::size_t column_index) const```
Returns the cell column_index distance away from the first cell in this vector.
2017-01-19 21:37:40 +08:00
### column_properties
2017-01-27 08:57:19 +08:00
#### ```optional<double> xlnt::column_properties::widthundefined```
2017-03-24 08:05:25 +08:00
The optional width of the column
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::column_properties::custom_widthundefined```
2017-03-24 08:05:25 +08:00
If true, this is a custom width
2017-01-27 08:57:19 +08:00
#### ```optional<std::size_t> xlnt::column_properties::styleundefined```
2017-03-24 08:05:25 +08:00
The style index of this column. This shouldn't be used since style indices aren't supposed to be used directly in xlnt. (TODO)
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::column_properties::hiddenundefined```
2017-03-24 08:05:25 +08:00
If true, this column will be hidden
2017-01-19 21:37:40 +08:00
### header_footer
2017-01-27 08:57:19 +08:00
#### ```undefinedundefined```
Enumerates the three possible locations of a header or footer.
#### ```bool xlnt::header_footer::has_header() const```
2017-01-19 21:37:40 +08:00
True if any text has been added for a header at any location on any page.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::header_footer::has_footer() const```
2017-01-19 21:37:40 +08:00
True if any text has been added for a footer at any location on any page.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::header_footer::align_with_margins() const```
2017-01-19 21:37:40 +08:00
True if headers and footers should align to the page margins.
2017-01-27 08:57:19 +08:00
#### ```header_footer& xlnt::header_footer::align_with_margins(bool align)```
2017-01-19 21:37:40 +08:00
Set to true if headers and footers should align to the page margins. Set to false if headers and footers should align to the edge of the page.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::header_footer::different_odd_even() const```
2017-01-19 21:37:40 +08:00
True if headers and footers differ based on page number.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::header_footer::different_first() const```
2017-01-19 21:37:40 +08:00
True if headers and footers are different on the first page.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::header_footer::scale_with_doc() const```
2017-01-19 21:37:40 +08:00
True if headers and footers should scale to match the worksheet.
2017-01-27 08:57:19 +08:00
#### ```header_footer& xlnt::header_footer::scale_with_doc(bool scale)```
2017-01-19 21:37:40 +08:00
Set to true if headers and footers should scale to match the worksheet.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::header_footer::has_header(location where) const```
2017-01-19 21:37:40 +08:00
True if any text has been added at the given location on any page.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::header_footer::clear_header()```
2017-01-19 21:37:40 +08:00
Remove all headers from all pages.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::header_footer::clear_header(location where)```
2017-01-19 21:37:40 +08:00
Remove header at the given location on any page.
2017-01-27 08:57:19 +08:00
#### ```header_footer& xlnt::header_footer::header(location where, const std::string &text)```
2017-01-19 21:37:40 +08:00
Add a header at the given location with the given text.
2017-01-27 08:57:19 +08:00
#### ```header_footer& xlnt::header_footer::header(location where, const rich_text &text)```
2017-01-19 21:37:40 +08:00
Add a header at the given location with the given text.
2017-01-27 08:57:19 +08:00
#### ```rich_text xlnt::header_footer::header(location where) const```
2017-01-19 21:37:40 +08:00
Get the text of the header at the given location. If headers are different on odd and even pages, the odd header will be returned.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::header_footer::has_first_page_header() const```
2017-01-19 21:37:40 +08:00
True if a header has been set for the first page at any location.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::header_footer::has_first_page_header(location where) const```
2017-01-19 21:37:40 +08:00
True if a header has been set for the first page at the given location.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::header_footer::clear_first_page_header()```
2017-01-19 21:37:40 +08:00
Remove all headers from the first page.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::header_footer::clear_first_page_header(location where)```
2017-01-19 21:37:40 +08:00
Remove header from the first page at the given location.
2017-01-27 08:57:19 +08:00
#### ```header_footer& xlnt::header_footer::first_page_header(location where, const rich_text &text)```
2017-01-19 21:37:40 +08:00
Add a header on the first page at the given location with the given text.
2017-01-27 08:57:19 +08:00
#### ```rich_text xlnt::header_footer::first_page_header(location where) const```
2017-01-19 21:37:40 +08:00
Get the text of the first page header at the given location. If no first page header has been set, the general header for that location will be returned.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::header_footer::has_odd_even_header() const```
2017-01-19 21:37:40 +08:00
True if different headers have been set for odd and even pages.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::header_footer::has_odd_even_header(location where) const```
2017-01-19 21:37:40 +08:00
True if different headers have been set for odd and even pages at the given location.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::header_footer::clear_odd_even_header()```
2017-01-19 21:37:40 +08:00
Remove odd/even headers at all locations.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::header_footer::clear_odd_even_header(location where)```
2017-01-19 21:37:40 +08:00
Remove odd/even headers at the given location.
2017-01-27 08:57:19 +08:00
#### ```header_footer& xlnt::header_footer::odd_even_header(location where, const rich_text &odd, const rich_text &even)```
2017-01-19 21:37:40 +08:00
Add a header for odd pages at the given location with the given text.
2017-01-27 08:57:19 +08:00
#### ```rich_text xlnt::header_footer::odd_header(location where) const```
2017-01-19 21:37:40 +08:00
Get the text of the odd page header at the given location. If no odd page header has been set, the general header for that location will be returned.
2017-01-27 08:57:19 +08:00
#### ```rich_text xlnt::header_footer::even_header(location where) const```
2017-01-19 21:37:40 +08:00
Get the text of the even page header at the given location. If no even page header has been set, the general header for that location will be returned.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::header_footer::has_footer(location where) const```
2017-01-19 21:37:40 +08:00
True if any text has been added at the given location on any page.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::header_footer::clear_footer()```
2017-01-19 21:37:40 +08:00
Remove all footers from all pages.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::header_footer::clear_footer(location where)```
2017-01-19 21:37:40 +08:00
Remove footer at the given location on any page.
2017-01-27 08:57:19 +08:00
#### ```header_footer& xlnt::header_footer::footer(location where, const std::string &text)```
2017-01-19 21:37:40 +08:00
Add a footer at the given location with the given text.
2017-01-27 08:57:19 +08:00
#### ```header_footer& xlnt::header_footer::footer(location where, const rich_text &text)```
2017-01-19 21:37:40 +08:00
Add a footer at the given location with the given text.
2017-01-27 08:57:19 +08:00
#### ```rich_text xlnt::header_footer::footer(location where) const```
2017-01-19 21:37:40 +08:00
Get the text of the footer at the given location. If footers are different on odd and even pages, the odd footer will be returned.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::header_footer::has_first_page_footer() const```
2017-01-19 21:37:40 +08:00
True if a footer has been set for the first page at any location.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::header_footer::has_first_page_footer(location where) const```
2017-01-19 21:37:40 +08:00
True if a footer has been set for the first page at the given location.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::header_footer::clear_first_page_footer()```
2017-01-19 21:37:40 +08:00
Remove all footers from the first page.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::header_footer::clear_first_page_footer(location where)```
2017-01-19 21:37:40 +08:00
Remove footer from the first page at the given location.
2017-01-27 08:57:19 +08:00
#### ```header_footer& xlnt::header_footer::first_page_footer(location where, const rich_text &text)```
2017-01-19 21:37:40 +08:00
Add a footer on the first page at the given location with the given text.
2017-01-27 08:57:19 +08:00
#### ```rich_text xlnt::header_footer::first_page_footer(location where) const```
2017-01-19 21:37:40 +08:00
Get the text of the first page footer at the given location. If no first page footer has been set, the general footer for that location will be returned.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::header_footer::has_odd_even_footer() const```
2017-01-19 21:37:40 +08:00
True if different footers have been set for odd and even pages.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::header_footer::has_odd_even_footer(location where) const```
2017-01-19 21:37:40 +08:00
True if different footers have been set for odd and even pages at the given location.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::header_footer::clear_odd_even_footer()```
2017-01-19 21:37:40 +08:00
Remove odd/even footers at all locations.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::header_footer::clear_odd_even_footer(location where)```
2017-01-19 21:37:40 +08:00
Remove odd/even footers at the given location.
2017-01-27 08:57:19 +08:00
#### ```header_footer& xlnt::header_footer::odd_even_footer(location where, const rich_text &odd, const rich_text &even)```
2017-01-19 21:37:40 +08:00
Add a footer for odd pages at the given location with the given text.
2017-01-27 08:57:19 +08:00
#### ```rich_text xlnt::header_footer::odd_footer(location where) const```
2017-01-19 21:37:40 +08:00
Get the text of the odd page footer at the given location. If no odd page footer has been set, the general footer for that location will be returned.
2017-01-27 08:57:19 +08:00
#### ```rich_text xlnt::header_footer::even_footer(location where) const```
2017-01-19 21:37:40 +08:00
Get the text of the even page footer at the given location. If no even page footer has been set, the general footer for that location will be returned.
### page_margins
2017-01-27 08:57:19 +08:00
#### ```xlnt::page_margins::page_margins()```
2017-03-24 08:05:25 +08:00
Constructs a page margins objects with Excel-default margins.
2017-01-27 08:57:19 +08:00
#### ```double xlnt::page_margins::top() const```
2017-03-24 08:05:25 +08:00
Returns the top margin
2017-01-27 08:57:19 +08:00
#### ```void xlnt::page_margins::top(double top)```
2017-03-24 08:05:25 +08:00
Sets the top margin to top
2017-01-27 08:57:19 +08:00
#### ```double xlnt::page_margins::left() const```
2017-03-24 08:05:25 +08:00
Returns the left margin
2017-01-27 08:57:19 +08:00
#### ```void xlnt::page_margins::left(double left)```
2017-03-24 08:05:25 +08:00
Sets the left margin to left
2017-01-27 08:57:19 +08:00
#### ```double xlnt::page_margins::bottom() const```
2017-03-24 08:05:25 +08:00
Returns the bottom margin
2017-01-27 08:57:19 +08:00
#### ```void xlnt::page_margins::bottom(double bottom)```
2017-03-24 08:05:25 +08:00
Sets the bottom margin to bottom
2017-01-27 08:57:19 +08:00
#### ```double xlnt::page_margins::right() const```
2017-03-24 08:05:25 +08:00
Returns the right margin
2017-01-27 08:57:19 +08:00
#### ```void xlnt::page_margins::right(double right)```
2017-03-24 08:05:25 +08:00
Sets the right margin to right
2017-01-27 08:57:19 +08:00
#### ```double xlnt::page_margins::header() const```
2017-03-24 08:05:25 +08:00
Returns the header margin
2017-01-27 08:57:19 +08:00
#### ```void xlnt::page_margins::header(double header)```
2017-03-24 08:05:25 +08:00
Sets the header margin to header
2017-01-27 08:57:19 +08:00
#### ```double xlnt::page_margins::footer() const```
2017-03-24 08:05:25 +08:00
Returns the footer margin
2017-01-27 08:57:19 +08:00
#### ```void xlnt::page_margins::footer(double footer)```
2017-03-24 08:05:25 +08:00
Sets the footer margin to footer
2017-01-19 21:37:40 +08:00
### page_setup
2017-01-27 08:57:19 +08:00
#### ```xlnt::page_setup::page_setup()```
#### ```xlnt::page_break xlnt::page_setup::page_break() const```
#### ```void xlnt::page_setup::page_break(xlnt::page_break b)```
#### ```xlnt::sheet_state xlnt::page_setup::sheet_state() const```
#### ```void xlnt::page_setup::sheet_state(xlnt::sheet_state sheet_state)```
#### ```xlnt::paper_size xlnt::page_setup::paper_size() const```
#### ```void xlnt::page_setup::paper_size(xlnt::paper_size paper_size)```
#### ```xlnt::orientation xlnt::page_setup::orientation() const```
#### ```void xlnt::page_setup::orientation(xlnt::orientation orientation)```
#### ```bool xlnt::page_setup::fit_to_page() const```
#### ```void xlnt::page_setup::fit_to_page(bool fit_to_page)```
#### ```bool xlnt::page_setup::fit_to_height() const```
#### ```void xlnt::page_setup::fit_to_height(bool fit_to_height)```
#### ```bool xlnt::page_setup::fit_to_width() const```
#### ```void xlnt::page_setup::fit_to_width(bool fit_to_width)```
#### ```void xlnt::page_setup::horizontal_centered(bool horizontal_centered)```
#### ```bool xlnt::page_setup::horizontal_centered() const```
#### ```void xlnt::page_setup::vertical_centered(bool vertical_centered)```
#### ```bool xlnt::page_setup::vertical_centered() const```
#### ```void xlnt::page_setup::scale(double scale)```
#### ```double xlnt::page_setup::scale() const```
2017-01-19 21:37:40 +08:00
### pane
2017-01-27 08:57:19 +08:00
#### ```optional<cell_reference> xlnt::pane::top_left_cellundefined```
#### ```pane_state xlnt::pane::stateundefined```
#### ```pane_corner xlnt::pane::active_paneundefined```
#### ```row_t xlnt::pane::y_splitundefined```
#### ```column_t xlnt::pane::x_splitundefined```
#### ```bool xlnt::pane::operator==(const pane &rhs) const```
2017-03-23 09:43:25 +08:00
Returns true if this pane is equal to rhs based on its top-left cell, state, active pane, and x/y split location.
2017-01-19 21:37:40 +08:00
### range
2017-01-27 08:57:19 +08:00
#### ```using xlnt::range::iterator = range_iteratorundefined```
#### ```using xlnt::range::const_iterator = const_range_iteratorundefined```
#### ```using xlnt::range::reverse_iterator = std::reverse_iterator<iterator>undefined```
#### ```using xlnt::range::const_reverse_iterator = std::reverse_iterator<const_iterator>undefined```
#### ```xlnt::range::range(worksheet ws, const range_reference &reference, major_order order=major_order::row, bool skip_null=false)```
#### ```xlnt::range::~range()```
#### ```xlnt::range::range(const range &)=default```
#### ```cell_vector xlnt::range::operator[](std::size_t vector_index)```
#### ```const cell_vector xlnt::range::operator[](std::size_t vector_index) const```
#### ```bool xlnt::range::operator==(const range &comparand) const```
#### ```bool xlnt::range::operator!=(const range &comparand) const```
#### ```cell_vector xlnt::range::vector(std::size_t vector_index)```
#### ```const cell_vector xlnt::range::vector(std::size_t vector_index) const```
#### ```class cell xlnt::range::cell(const cell_reference &ref)```
#### ```const class cell xlnt::range::cell(const cell_reference &ref) const```
#### ```range_reference xlnt::range::reference() const```
#### ```std::size_t xlnt::range::length() const```
#### ```bool xlnt::range::contains(const cell_reference &ref)```
2017-03-23 09:43:25 +08:00
#### ```range xlnt::range::alignment(const xlnt::alignment &new_alignment)```
#### ```range xlnt::range::border(const xlnt::border &new_border)```
#### ```range xlnt::range::fill(const xlnt::fill &new_fill)```
#### ```range xlnt::range::font(const xlnt::font &new_font)```
#### ```range xlnt::range::number_format(const xlnt::number_format &new_number_format)```
#### ```range xlnt::range::protection(const xlnt::protection &new_protection)```
#### ```range xlnt::range::style(const class style &new_style)```
Sets the named style applied to all cells in this range to a style named style_name.
#### ```range xlnt::range::style(const std::string &style_name)```
Sets the named style applied to all cells in this range to a style named style_name. If this style has not been previously created in the workbook, a key_not_found exception will be thrown.
2017-03-24 08:05:25 +08:00
#### ```cell_vector xlnt::range::front()```
#### ```const cell_vector xlnt::range::front() const```
#### ```cell_vector xlnt::range::back()```
#### ```const cell_vector xlnt::range::back() const```
2017-01-27 08:57:19 +08:00
#### ```iterator xlnt::range::begin()```
#### ```iterator xlnt::range::end()```
#### ```const_iterator xlnt::range::begin() const```
#### ```const_iterator xlnt::range::end() const```
#### ```const_iterator xlnt::range::cbegin() const```
#### ```const_iterator xlnt::range::cend() const```
#### ```reverse_iterator xlnt::range::rbegin()```
#### ```reverse_iterator xlnt::range::rend()```
#### ```const_reverse_iterator xlnt::range::rbegin() const```
#### ```const_reverse_iterator xlnt::range::rend() const```
#### ```const_reverse_iterator xlnt::range::crbegin() const```
#### ```const_reverse_iterator xlnt::range::crend() const```
2017-03-23 09:43:25 +08:00
#### ```void xlnt::range::apply(std::function< void(class cell)> f)```
2017-01-19 21:37:40 +08:00
### range_iterator
2017-03-24 08:05:25 +08:00
#### ```xlnt::range_iterator::range_iterator(worksheet &ws, const cell_reference &cursor, const range_reference &bounds, major_order order, bool skip_null)```
2017-01-27 08:57:19 +08:00
#### ```xlnt::range_iterator::range_iterator(const range_iterator &other)```
#### ```cell_vector xlnt::range_iterator::operator*() const```
#### ```range_iterator& xlnt::range_iterator::operator=(const range_iterator &)=default```
#### ```bool xlnt::range_iterator::operator==(const range_iterator &other) const```
#### ```bool xlnt::range_iterator::operator!=(const range_iterator &other) const```
#### ```range_iterator& xlnt::range_iterator::operator--()```
#### ```range_iterator xlnt::range_iterator::operator--(int)```
#### ```range_iterator& xlnt::range_iterator::operator++()```
#### ```range_iterator xlnt::range_iterator::operator++(int)```
2017-03-23 09:43:25 +08:00
### const_range_iterator
2017-03-24 08:05:25 +08:00
#### ```xlnt::const_range_iterator::const_range_iterator(const worksheet &ws, const cell_reference &cursor, const range_reference &bounds, major_order order, bool skip_null)```
2017-03-23 09:43:25 +08:00
#### ```xlnt::const_range_iterator::const_range_iterator(const const_range_iterator &other)```
#### ```const cell_vector xlnt::const_range_iterator::operator*() const```
#### ```const_range_iterator& xlnt::const_range_iterator::operator=(const const_range_iterator &)=default```
#### ```bool xlnt::const_range_iterator::operator==(const const_range_iterator &other) const```
#### ```bool xlnt::const_range_iterator::operator!=(const const_range_iterator &other) const```
#### ```const_range_iterator& xlnt::const_range_iterator::operator--()```
#### ```const_range_iterator xlnt::const_range_iterator::operator--(int)```
#### ```const_range_iterator& xlnt::const_range_iterator::operator++()```
#### ```const_range_iterator xlnt::const_range_iterator::operator++(int)```
2017-01-19 21:37:40 +08:00
### range_reference
2017-01-27 08:57:19 +08:00
#### ```static range_reference xlnt::range_reference::make_absolute(const range_reference &relative_reference)```
2017-01-19 21:37:40 +08:00
Convert a coordinate to an absolute coordinate string (B12 -> $B$12)
2017-01-27 08:57:19 +08:00
#### ```xlnt::range_reference::range_reference()```
#### ```xlnt::range_reference::range_reference(const std::string &range_string)```
#### ```xlnt::range_reference::range_reference(const char *range_string)```
#### ```xlnt::range_reference::range_reference(const std::pair< cell_reference, cell_reference > &reference_pair)```
#### ```xlnt::range_reference::range_reference(const cell_reference &start, const cell_reference &end)```
#### ```xlnt::range_reference::range_reference(column_t column_index_start, row_t row_index_start, column_t column_index_end, row_t row_index_end)```
#### ```bool xlnt::range_reference::is_single_cell() const```
#### ```std::size_t xlnt::range_reference::width() const```
#### ```std::size_t xlnt::range_reference::height() const```
2017-03-24 08:05:25 +08:00
#### ```cell_reference xlnt::range_reference::top_left()```
2017-01-27 08:57:19 +08:00
#### ```cell_reference xlnt::range_reference::top_left() const```
2017-03-24 08:05:25 +08:00
#### ```cell_reference xlnt::range_reference::top_right()```
#### ```cell_reference xlnt::range_reference::top_right() const```
#### ```cell_reference xlnt::range_reference::bottom_left()```
#### ```cell_reference xlnt::range_reference::bottom_left() const```
#### ```cell_reference xlnt::range_reference::bottom_right()```
2017-01-27 08:57:19 +08:00
#### ```cell_reference xlnt::range_reference::bottom_right() const```
#### ```range_reference xlnt::range_reference::make_offset(int column_offset, int row_offset) const```
#### ```std::string xlnt::range_reference::to_string() const```
#### ```bool xlnt::range_reference::operator==(const range_reference &comparand) const```
#### ```bool xlnt::range_reference::operator==(const std::string &reference_string) const```
#### ```bool xlnt::range_reference::operator==(const char *reference_string) const```
#### ```bool xlnt::range_reference::operator!=(const range_reference &comparand) const```
#### ```bool xlnt::range_reference::operator!=(const std::string &reference_string) const```
#### ```bool xlnt::range_reference::operator!=(const char *reference_string) const```
#### ```bool operator==(const std::string &reference_string, const range_reference &ref)```
#### ```bool operator==(const char *reference_string, const range_reference &ref)```
#### ```bool operator!=(const std::string &reference_string, const range_reference &ref)```
#### ```bool operator!=(const char *reference_string, const range_reference &ref)```
2017-01-19 21:37:40 +08:00
### row_properties
2017-01-27 08:57:19 +08:00
#### ```optional<double> xlnt::row_properties::heightundefined```
#### ```bool xlnt::row_properties::custom_heightundefined```
#### ```bool xlnt::row_properties::hiddenundefined```
#### ```optional<std::size_t> xlnt::row_properties::styleundefined```
2017-01-19 21:37:40 +08:00
### selection
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::selection::has_active_cell() const```
#### ```cell_reference xlnt::selection::active_cell() const```
#### ```void xlnt::selection::active_cell(const cell_reference &ref)```
#### ```range_reference xlnt::selection::sqref() const```
#### ```pane_corner xlnt::selection::pane() const```
#### ```void xlnt::selection::pane(pane_corner corner)```
#### ```bool xlnt::selection::operator==(const selection &rhs) const```
2017-03-23 09:43:25 +08:00
Returns true if this selection is equal to rhs based on its active cell, sqref, and pane.
2017-01-19 21:37:40 +08:00
### sheet_protection
2017-01-27 08:57:19 +08:00
#### ```static std::string xlnt::sheet_protection::hash_password(const std::string &password)```
#### ```void xlnt::sheet_protection::password(const std::string &password)```
#### ```std::string xlnt::sheet_protection::hashed_password() const```
2017-01-19 21:37:40 +08:00
### sheet_view
2017-01-27 08:57:19 +08:00
#### ```void xlnt::sheet_view::id(std::size_t new_id)```
#### ```std::size_t xlnt::sheet_view::id() const```
#### ```bool xlnt::sheet_view::has_pane() const```
#### ```struct pane& xlnt::sheet_view::pane()```
#### ```const struct pane& xlnt::sheet_view::pane() const```
#### ```void xlnt::sheet_view::clear_pane()```
#### ```void xlnt::sheet_view::pane(const struct pane &new_pane)```
#### ```bool xlnt::sheet_view::has_selections() const```
#### ```void xlnt::sheet_view::add_selection(const class selection &new_selection)```
#### ```void xlnt::sheet_view::clear_selections()```
#### ```std::vector<xlnt::selection> xlnt::sheet_view::selections() const```
#### ```class xlnt::selection& xlnt::sheet_view::selection(std::size_t index)```
#### ```void xlnt::sheet_view::show_grid_lines(bool show)```
#### ```bool xlnt::sheet_view::show_grid_lines() const```
#### ```void xlnt::sheet_view::default_grid_color(bool is_default)```
#### ```bool xlnt::sheet_view::default_grid_color() const```
#### ```void xlnt::sheet_view::type(sheet_view_type new_type)```
2017-03-23 09:43:25 +08:00
Sets the type of this view.
2017-01-27 08:57:19 +08:00
#### ```sheet_view_type xlnt::sheet_view::type() const```
2017-03-23 09:43:25 +08:00
Returns the type of this view.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::sheet_view::operator==(const sheet_view &rhs) const```
2017-03-23 09:43:25 +08:00
Returns true if this view is requal to rhs based on its id, grid lines setting, default grid color, pane, and selections.
2017-01-19 21:37:40 +08:00
### worksheet
2017-01-27 08:57:19 +08:00
#### ```using xlnt::worksheet::iterator = range_iteratorundefined```
2017-01-19 21:37:40 +08:00
Iterate over a non-const worksheet with an iterator of this type.
2017-01-27 08:57:19 +08:00
#### ```using xlnt::worksheet::const_iterator = const_range_iteratorundefined```
2017-01-19 21:37:40 +08:00
Iterate over a non-const worksheet with an iterator of this type.
2017-01-27 08:57:19 +08:00
#### ```using xlnt::worksheet::reverse_iterator = std::reverse_iterator<iterator>undefined```
2017-01-19 21:37:40 +08:00
Iterate in reverse over a non-const worksheet with an iterator of this type.
2017-01-27 08:57:19 +08:00
#### ```using xlnt::worksheet::const_reverse_iterator = std::reverse_iterator<const_iterator>undefined```
2017-01-19 21:37:40 +08:00
Iterate in reverse order over a const worksheet with an iterator of this type.
2017-01-27 08:57:19 +08:00
#### ```friend class detail::xlsx_consumerundefined```
#### ```friend class detail::xlsx_producerundefined```
#### ```xlnt::worksheet::worksheet()```
2017-01-19 21:37:40 +08:00
Construct a null worksheet. No methods should be called on such a worksheet.
2017-01-27 08:57:19 +08:00
#### ```xlnt::worksheet::worksheet(const worksheet &rhs)```
2017-01-19 21:37:40 +08:00
Copy constructor. This worksheet will point to the same memory as rhs's worksheet.
2017-01-27 08:57:19 +08:00
#### ```class workbook& xlnt::worksheet::workbook()```
2017-01-19 21:37:40 +08:00
Returns a reference to the workbook this worksheet is owned by.
2017-01-27 08:57:19 +08:00
#### ```const class workbook& xlnt::worksheet::workbook() const```
2017-01-19 21:37:40 +08:00
Returns a reference to the workbook this worksheet is owned by.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::worksheet::garbage_collect()```
2017-01-19 21:37:40 +08:00
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.
2017-01-27 08:57:19 +08:00
#### ```std::size_t xlnt::worksheet::id() const```
2017-01-19 21:37:40 +08:00
Returns the unique numeric identifier of this worksheet. This will sometimes but not necessarily be the index of the worksheet in the workbook.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::worksheet::id(std::size_t id)```
2017-01-19 21:37:40 +08:00
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.
2017-01-27 08:57:19 +08:00
#### ```std::string xlnt::worksheet::title() const```
2017-01-19 21:37:40 +08:00
Returns the title of this sheet.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::worksheet::title(const std::string &title)```
2017-01-19 21:37:40 +08:00
Sets the title of this sheet.
2017-01-27 08:57:19 +08:00
#### ```cell_reference xlnt::worksheet::frozen_panes() const```
2017-01-19 21:37:40 +08:00
Returns the top left corner of the region above and to the left of which panes are frozen.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::worksheet::freeze_panes(cell top_left_cell)```
2017-01-19 21:37:40 +08:00
Freeze panes above and to the left of top_left_cell.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::worksheet::freeze_panes(const cell_reference &top_left_coordinate)```
2017-01-19 21:37:40 +08:00
Freeze panes above and to the left of top_left_coordinate.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::worksheet::unfreeze_panes()```
2017-01-19 21:37:40 +08:00
Remove frozen panes. The data in those panes will be unaffectedthis affects only the view.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::worksheet::has_frozen_panes() const```
2017-01-19 21:37:40 +08:00
Returns true if this sheet has a frozen row, frozen column, or both.
2017-03-23 09:43:25 +08:00
#### ```bool xlnt::worksheet::has_cell(const cell_reference &reference) const```
Returns true if this sheet has an initialized cell at the given reference.
2017-01-27 08:57:19 +08:00
#### ```class cell xlnt::worksheet::cell(const cell_reference &reference)```
2017-03-23 09:43:25 +08:00
Returns the cell at the given reference. If the cell doesn't exist, it will be initialized to null before being returned.
2017-01-27 08:57:19 +08:00
#### ```const class cell xlnt::worksheet::cell(const cell_reference &reference) const```
2017-03-23 09:43:25 +08:00
Returns the cell at the given reference. If the cell doesn't exist, an invalid_parameter exception will be thrown.
#### ```class cell xlnt::worksheet::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.
#### ```const class cell xlnt::worksheet::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.
2017-01-27 08:57:19 +08:00
#### ```class range xlnt::worksheet::range(const std::string &reference_string)```
2017-03-23 09:43:25 +08:00
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.
2017-01-27 08:57:19 +08:00
#### ```const class range xlnt::worksheet::range(const std::string &reference_string) const```
2017-03-23 09:43:25 +08:00
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.
2017-01-27 08:57:19 +08:00
#### ```const class range xlnt::worksheet::range(const range_reference &reference) const```
2017-03-23 09:43:25 +08:00
Returns the range defined by reference.
2017-03-24 08:05:25 +08:00
#### ```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), empty rows and cells will be skipped during iteration of the range.
#### ```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), empty rows 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), empty columns and cells will be skipped during iteration of the range.
#### ```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), empty columns and cells will be skipped during iteration of the range.
2017-01-27 08:57:19 +08:00
#### ```xlnt::column_properties& xlnt::worksheet::column_properties(column_t column)```
2017-03-23 09:43:25 +08:00
Returns the column properties for the given column.
2017-01-27 08:57:19 +08:00
#### ```const xlnt::column_properties& xlnt::worksheet::column_properties(column_t column) const```
2017-03-23 09:43:25 +08:00
Returns the column properties for the given column.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::worksheet::has_column_properties(column_t column) const```
2017-03-23 09:43:25 +08:00
Returns true if column properties have been set for the given column.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::worksheet::add_column_properties(column_t column, const class column_properties &props)```
2017-03-23 09:43:25 +08:00
Sets column properties for the given column to props.
2017-01-27 08:57:19 +08:00
#### ```double xlnt::worksheet::column_width(column_t column) const```
2017-03-23 09:43:25 +08:00
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.
2017-01-27 08:57:19 +08:00
#### ```xlnt::row_properties& xlnt::worksheet::row_properties(row_t row)```
2017-03-23 09:43:25 +08:00
Returns the row properties for the given row.
2017-01-27 08:57:19 +08:00
#### ```const xlnt::row_properties& xlnt::worksheet::row_properties(row_t row) const```
2017-03-23 09:43:25 +08:00
Returns the row properties for the given row.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::worksheet::has_row_properties(row_t row) const```
2017-03-23 09:43:25 +08:00
Returns true if row properties have been set for the given row.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::worksheet::add_row_properties(row_t row, const class row_properties &props)```
2017-03-23 09:43:25 +08:00
Sets row properties for the given row to props.
2017-01-27 08:57:19 +08:00
#### ```double xlnt::worksheet::row_height(row_t row) const```
2017-01-19 21:37:40 +08:00
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.
2017-01-27 08:57:19 +08:00
#### ```cell_reference xlnt::worksheet::point_pos(int left, int top) const```
2017-03-23 09:43:25 +08:00
Returns a reference to the cell at the given point coordinates.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::worksheet::create_named_range(const std::string &name, const std::string &reference_string)```
#### ```void xlnt::worksheet::create_named_range(const std::string &name, const range_reference &reference)```
2017-03-23 09:43:25 +08:00
#### ```bool xlnt::worksheet::has_named_range(const std::string &name) const```
2017-01-27 08:57:19 +08:00
#### ```class range xlnt::worksheet::named_range(const std::string &name)```
2017-03-23 09:43:25 +08:00
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.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::worksheet::remove_named_range(const std::string &name)```
2017-03-23 09:43:25 +08:00
Removes a named range with the given name.
2017-01-27 08:57:19 +08:00
#### ```row_t xlnt::worksheet::lowest_row() const```
#### ```row_t xlnt::worksheet::highest_row() const```
#### ```row_t xlnt::worksheet::next_row() const```
#### ```column_t xlnt::worksheet::lowest_column() const```
#### ```column_t xlnt::worksheet::highest_column() const```
#### ```range_reference xlnt::worksheet::calculate_dimension() const```
#### ```void xlnt::worksheet::merge_cells(const std::string &reference_string)```
#### ```void xlnt::worksheet::merge_cells(const range_reference &reference)```
#### ```void xlnt::worksheet::merge_cells(column_t start_column, row_t start_row, column_t end_column, row_t end_row)```
#### ```void xlnt::worksheet::unmerge_cells(const std::string &reference_string)```
#### ```void xlnt::worksheet::unmerge_cells(const range_reference &reference)```
#### ```void xlnt::worksheet::unmerge_cells(column_t start_column, row_t start_row, column_t end_column, row_t end_row)```
#### ```std::vector<range_reference> xlnt::worksheet::merged_ranges() const```
#### ```bool xlnt::worksheet::operator==(const worksheet &other) const```
#### ```bool xlnt::worksheet::operator!=(const worksheet &other) const```
#### ```bool xlnt::worksheet::operator==(std::nullptr_t) const```
#### ```bool xlnt::worksheet::operator!=(std::nullptr_t) const```
#### ```void xlnt::worksheet::operator=(const worksheet &other)```
#### ```class cell xlnt::worksheet::operator[](const cell_reference &reference)```
2017-03-23 09:43:25 +08:00
Convenience method for worksheet::cell method.
2017-01-27 08:57:19 +08:00
#### ```const class cell xlnt::worksheet::operator[](const cell_reference &reference) const```
2017-03-23 09:43:25 +08:00
Convenience method for worksheet::cell method.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::worksheet::compare(const worksheet &other, bool reference) const```
2017-03-23 09:43:25 +08:00
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.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::worksheet::has_page_setup() const```
2017-03-23 09:43:25 +08:00
Returns true if this worksheet has a page setup.
2017-01-27 08:57:19 +08:00
#### ```xlnt::page_setup xlnt::worksheet::page_setup() const```
2017-03-23 09:43:25 +08:00
Returns the page setup for this sheet.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::worksheet::page_setup(const struct page_setup &setup)```
2017-03-23 09:43:25 +08:00
Sets the page setup for this sheet to setup.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::worksheet::has_page_margins() const```
2017-03-23 09:43:25 +08:00
Returns true if this page has margins.
2017-01-27 08:57:19 +08:00
#### ```xlnt::page_margins xlnt::worksheet::page_margins() const```
2017-03-23 09:43:25 +08:00
Returns the margins of this sheet.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::worksheet::page_margins(const class page_margins &margins)```
2017-03-23 09:43:25 +08:00
Sets the margins of this sheet to margins.
2017-01-27 08:57:19 +08:00
#### ```range_reference xlnt::worksheet::auto_filter() const```
2017-03-23 09:43:25 +08:00
Returns the current auto-filter of this sheet.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::worksheet::auto_filter(const std::string &range_string)```
2017-03-23 09:43:25 +08:00
Sets the auto-filter of this sheet to the range defined by range_string.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::worksheet::auto_filter(const xlnt::range &range)```
2017-03-23 09:43:25 +08:00
Sets the auto-filter of this sheet to the given range.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::worksheet::auto_filter(const range_reference &reference)```
2017-03-23 09:43:25 +08:00
Sets the auto-filter of this sheet to the range defined by reference.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::worksheet::clear_auto_filter()```
2017-03-23 09:43:25 +08:00
Clear the auto-filter from this sheet.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::worksheet::has_auto_filter() const```
2017-03-23 09:43:25 +08:00
Returns true if this sheet has an auto-filter set.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::worksheet::reserve(std::size_t n)```
2017-03-23 09:43:25 +08:00
Reserve n rows. This can be optionally called before adding many rows to improve performance.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::worksheet::has_header_footer() const```
2017-03-23 09:43:25 +08:00
Returns true if this sheet has a header/footer.
2017-01-27 08:57:19 +08:00
#### ```class header_footer xlnt::worksheet::header_footer() const```
2017-03-23 09:43:25 +08:00
Returns the header/footer of this sheet.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::worksheet::header_footer(const class header_footer &new_header_footer)```
2017-03-23 09:43:25 +08:00
Sets the header/footer of this sheet to new_header_footer.
2017-01-27 08:57:19 +08:00
#### ```xlnt::sheet_state xlnt::worksheet::sheet_state() const```
2017-03-23 09:43:25 +08:00
Returns the sheet state of this sheet.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::worksheet::sheet_state(xlnt::sheet_state state)```
2017-03-23 09:43:25 +08:00
Sets the sheet state of this sheet.
2017-01-27 08:57:19 +08:00
#### ```iterator xlnt::worksheet::begin()```
2017-03-23 09:43:25 +08:00
Returns an iterator to the first row in this sheet.
2017-01-27 08:57:19 +08:00
#### ```iterator xlnt::worksheet::end()```
2017-03-23 09:43:25 +08:00
Returns an iterator one past the last row in this sheet.
2017-01-27 08:57:19 +08:00
#### ```const_iterator xlnt::worksheet::begin() const```
2017-03-23 09:43:25 +08:00
Return a constant iterator to the first row in this sheet.
2017-01-27 08:57:19 +08:00
#### ```const_iterator xlnt::worksheet::end() const```
2017-03-23 09:43:25 +08:00
Returns a constant iterator to one past the last row in this sheet.
2017-01-27 08:57:19 +08:00
#### ```const_iterator xlnt::worksheet::cbegin() const```
2017-03-23 09:43:25 +08:00
Return a constant iterator to the first row in this sheet.
2017-01-27 08:57:19 +08:00
#### ```const_iterator xlnt::worksheet::cend() const```
2017-03-23 09:43:25 +08:00
Returns a constant iterator to one past the last row in this sheet.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::worksheet::print_title_rows(row_t first_row, row_t last_row)```
2017-03-23 09:43:25 +08:00
Sets rows to repeat at top during printing.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::worksheet::print_title_rows(row_t last_row)```
2017-03-23 09:43:25 +08:00
Sets rows to repeat at top during printing.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::worksheet::print_title_cols(column_t first_column, column_t last_column)```
2017-03-23 09:43:25 +08:00
Sets columns to repeat at left during printing.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::worksheet::print_title_cols(column_t last_column)```
2017-03-23 09:43:25 +08:00
Sets columns to repeat at left during printing.
2017-01-27 08:57:19 +08:00
#### ```std::string xlnt::worksheet::print_titles() const```
2017-03-23 09:43:25 +08:00
Returns a string representation of the defined print titles.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::worksheet::print_area(const std::string &print_area)```
2017-03-23 09:43:25 +08:00
Sets the print area of this sheet to print_area.
2017-01-27 08:57:19 +08:00
#### ```range_reference xlnt::worksheet::print_area() const```
2017-03-23 09:43:25 +08:00
Returns the print area defined for this sheet.
2017-01-27 08:57:19 +08:00
#### ```bool xlnt::worksheet::has_view() const```
2017-03-23 09:43:25 +08:00
Returns true if this sheet has any number of views defined.
2017-01-27 08:57:19 +08:00
#### ```sheet_view xlnt::worksheet::view(std::size_t index=0) const```
2017-03-23 09:43:25 +08:00
Returns the view at the given index.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::worksheet::add_view(const sheet_view &new_view)```
2017-03-23 09:43:25 +08:00
Adds new_view to the set of available views for this sheet.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::worksheet::clear_page_breaks()```
2017-01-19 21:37:40 +08:00
Remove all manual column and row page breaks (represented as dashed blue lines in the page view in Excel).
2017-01-27 08:57:19 +08:00
#### ```const std::vector<row_t>& xlnt::worksheet::page_break_rows() const```
2017-01-19 21:37:40 +08:00
Returns vector where each element represents a row which will break a page below it.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::worksheet::page_break_at_row(row_t row)```
2017-01-19 21:37:40 +08:00
Add a page break at the given row.
2017-01-27 08:57:19 +08:00
#### ```const std::vector<column_t>& xlnt::worksheet::page_break_columns() const```
2017-01-19 21:37:40 +08:00
Returns vector where each element represents a column which will break a page to the right.
2017-01-27 08:57:19 +08:00
#### ```void xlnt::worksheet::page_break_at_column(column_t column)```
2017-01-19 21:37:40 +08:00
Add a page break at the given column.