namespace orcus::spreadsheet

Enum

auto_filter_node_op_t

enum class orcus::spreadsheet::auto_filter_node_op_t

Values:

enumerator unspecified
enumerator op_and
enumerator op_or

auto_filter_op_t

enum class orcus::spreadsheet::auto_filter_op_t

Values:

enumerator unspecified
enumerator empty
enumerator not_empty
enumerator equal
enumerator not_equal
enumerator contain
enumerator not_contain
enumerator begin_with
enumerator not_begin_with
enumerator end_with
enumerator not_end_with
enumerator greater
enumerator greater_equal
enumerator less
enumerator less_equal
enumerator top
enumerator bottom
enumerator top_percent
enumerator bottom_percent
enumerator top_percent_range
enumerator bottom_percent_range

border_direction_t

enum class orcus::spreadsheet::border_direction_t

Type of border direction, used to reference the position of a border in a cell.

Values:

enumerator unknown

Unknown or uninitialized border direction value.

enumerator top

Top border of a cell.

enumerator bottom

Bottom border of a cell.

enumerator left

Left border of a cell.

enumerator right

Right border of a cell.

enumerator diagonal

Cross-diagonal borders of a cell. This is equivalent of both diagonal_bl_tr and diagonal_tl_br combined.

enumerator diagonal_bl_tr

Diagonal border of a cell that runs from bottom-left to top-right.

enumerator diagonal_tl_br

Diagonal border of a cell that runs from top-left to bottom-right.

border_style_t

enum class orcus::spreadsheet::border_style_t

Type of border style.

Values:

enumerator unknown
enumerator none
enumerator solid
enumerator dash_dot
enumerator dash_dot_dot
enumerator dashed
enumerator dotted
enumerator double_border
enumerator hair
enumerator medium
enumerator medium_dash_dot
enumerator medium_dash_dot_dot
enumerator medium_dashed
enumerator slant_dash_dot
enumerator thick
enumerator thin
enumerator double_thin
enumerator fine_dashed

condition_date_t

enum class orcus::spreadsheet::condition_date_t

Type of a date condition when the type of a conditional format entry is date.

Values:

enumerator unknown
enumerator today
enumerator yesterday
enumerator tomorrow
enumerator last_7_days
enumerator this_week
enumerator next_week
enumerator last_week
enumerator this_month
enumerator next_month
enumerator last_month
enumerator this_year
enumerator next_year
enumerator last_year

condition_operator_t

enum class orcus::spreadsheet::condition_operator_t

Operator type associated with a conditional format rule.

Values:

enumerator unknown
enumerator equal
enumerator less
enumerator greater
enumerator greater_equal
enumerator less_equal
enumerator not_equal
enumerator between
enumerator not_between
enumerator duplicate
enumerator unique
enumerator top_n
enumerator bottom_n
enumerator above_average
enumerator below_average
enumerator above_equal_average
enumerator below_equal_average
enumerator contains_error
enumerator contains_no_error
enumerator begins_with
enumerator ends_with
enumerator contains
enumerator contains_blanks
enumerator not_contains
enumerator expression

condition_type_t

enum class orcus::spreadsheet::condition_type_t

Type of a condition in a conditional format rule. This is applicable only when the type of a conditional format entry is either:

  • colorscale,

  • databar or

  • iconset.

Values:

enumerator unknown
enumerator value
enumerator automatic
enumerator max
enumerator min
enumerator formula
enumerator percent
enumerator percentile

conditional_format_t

enum class orcus::spreadsheet::conditional_format_t

Type of conditional format.

Values:

enumerator unknown
enumerator condition
enumerator date
enumerator formula
enumerator colorscale
enumerator databar
enumerator iconset

data_table_type_t

enum class orcus::spreadsheet::data_table_type_t

Type of data table. A data table can be either of a single-variable column, a single-variable row, or a double-variable type that uses both column and row input cells.

Values:

enumerator column
enumerator row
enumerator both

databar_axis_t

enum class orcus::spreadsheet::databar_axis_t

Databar axis type, applicable only when the type of a conditional format entry is databar.

Values:

enumerator none
enumerator middle
enumerator automatic

error_value_t

enum class orcus::spreadsheet::error_value_t

Type of error value in cells.

Values:

enumerator unknown

Error type unknown, typically used as an initial error value or generic default value.

enumerator null

Null reference error, displayed as #NULL!.

enumerator div0

Division-by-zero error, displayed as #DIV/0.

enumerator value

Formula expression error, displayed as #VALUE!.

enumerator ref

Reference error, displayed as #REF!.

enumerator name

Invalid named-expression error, displayed as #NAME?

enumerator num

Invalid numeric value error, displayed as #NUM!.

enumerator na

No value is available error, displayed as #N/A!.

fill_pattern_t

enum class orcus::spreadsheet::fill_pattern_t

Type of fill pattern for cell background.

Values:

enumerator none
enumerator solid
enumerator dark_down
enumerator dark_gray
enumerator dark_grid
enumerator dark_horizontal
enumerator dark_trellis
enumerator dark_up
enumerator dark_vertical
enumerator gray_0625
enumerator gray_125
enumerator light_down
enumerator light_gray
enumerator light_grid
enumerator light_horizontal
enumerator light_trellis
enumerator light_up
enumerator light_vertical
enumerator medium_gray

formula_error_policy_t

enum class orcus::spreadsheet::formula_error_policy_t

Type of policy on how to handle a formula cell with an erroneous expression that has been parsed unsuccessfully.

Values:

enumerator unknown
enumerator fail

Loading of the document will be halted.

enumerator skip

The error cell will be skipped.

formula_grammar_t

enum class orcus::spreadsheet::formula_grammar_t

Type that specifies the grammar of a formula expression. Each grammar may exhibit a different set of syntax rules.

Values:

enumerator unknown

Grammar type is either unknown or unspecified.

enumerator xls_xml

Grammar used by the Excel 2003 XML (aka XML Spreadsheet) format.

enumerator xlsx

Grammar used by the Office Open XML spreadsheet format.

enumerator ods

Grammar used by the OpenDocument Spreadsheet format.

enumerator gnumeric

Grammar used by the Gnumeric XML format.

formula_ref_context_t

enum class orcus::spreadsheet::formula_ref_context_t

Formula reference context specifies the location where a formula expression is used. This is used mainly for those document formats that make use of multiple formula reference syntaxes, such as ODS.

Values:

enumerator global

Default context, that is, the context that is NOT any of the other contexts specified below.

enumerator named_expression_base

Base cell position of either a named range or expression.

enumerator named_range

Named range is a special case of named expression where the expression consists of only one range token. Only ODS uses a different syntax in this context.

enumerator table_range

Range of a table, or a database range as it’s called in ODS. Only ODS uses a different syntax in this context.

formula_t

enum class orcus::spreadsheet::formula_t

Type of formula expression.

Values:

enumerator unknown

Formula expression type unknown, or generic default value.

enumerator array

Formula expression in an array of cells.

enumerator data_table

Formula expression in a data table.

enumerator normal

Formula expression in a normal formula cell.

enumerator shared

Formula expression in a shared formula cell.

hor_alignment_t

enum class orcus::spreadsheet::hor_alignment_t

Type of horizontal alignment applied to a cell content.

Values:

enumerator unknown
enumerator left
enumerator center
enumerator right
enumerator justified
enumerator distributed
enumerator filled

pane_state_t

enum class orcus::spreadsheet::pane_state_t : uint8_t

State of a split pane - whether it’s frozen, split, or both.

Values:

enumerator unspecified

The state of the pane is not specified.

enumerator frozen

The pane is frozen.

enumerator split

The pane is split.

enumerator frozen_split

The pane is both frozen and split.

pivot_cache_group_by_t

enum class orcus::spreadsheet::pivot_cache_group_by_t

Type of range grouping in a group field of a pivot table cache.

Values:

enumerator unknown

Type of range grouping is unknown.

This is an implicit default value of this type.

enumerator days

Grouping on “days” for date values.

enumerator hours

Grouping on “hours” for date values.

enumerator minutes

Grouping on “minutes” for date values.

enumerator months

Grouping on “months” for date values.

enumerator quarters

Grouping on “quarters” for date values.

enumerator range

Grouping by numeric ranges for numeric values.

enumerator seconds

Grouping on “seconds” for date values.

enumerator years

Grouping on “years” for date values.

sheet_pane_t

enum class orcus::spreadsheet::sheet_pane_t : uint8_t

Sheet pane position in a split sheet view. When the sheet is split, it is split into four panes.

Values:

enumerator unspecified
enumerator top_left

Top-left pane.

enumerator top_right

Top-right pane.

enumerator bottom_left

Bottom-left pane.

enumerator bottom_right

Bottom-right pane.

strikethrough_style_t

enum class orcus::spreadsheet::strikethrough_style_t

Strikethrough style as applied to a cell value.

Note

This is specific to ODS format.

Values:

enumerator none
enumerator solid
enumerator dash
enumerator dot_dash
enumerator dot_dot_dash
enumerator dotted
enumerator long_dash
enumerator wave

strikethrough_text_t

enum class orcus::spreadsheet::strikethrough_text_t

Text used for strike-through.

Note

This is specific to ODS format.

Values:

enumerator unknown
enumerator slash

/ is used as the text.

enumerator cross

X is used as the text.

strikethrough_type_t

enum class orcus::spreadsheet::strikethrough_type_t

Strikethrough type as applied to a cell value.

Note

This is specific to ODS format.

Values:

enumerator unknown
enumerator none
enumerator single_type
enumerator double_type

strikethrough_width_t

enum class orcus::spreadsheet::strikethrough_width_t

Width of strikethrough applied to a cell value.

Note

This is specific to ODS format.

Values:

enumerator unknown
enumerator width_auto
enumerator thin
enumerator medium
enumerator thick
enumerator bold

totals_row_function_t

enum class orcus::spreadsheet::totals_row_function_t

Function type used in the totals row of a table.

Values:

enumerator none
enumerator sum
enumerator minimum
enumerator maximum
enumerator average
enumerator count
enumerator count_numbers
enumerator standard_deviation
enumerator variance
enumerator custom

underline_count_t

enum class orcus::spreadsheet::underline_count_t

Underline style related to the number of vertically-stacked lines in an underline.

Values:

enumerator none
enumerator single_count

Only one line is used to form an underline.

enumerator double_count

Two vertically-stacked lines are used in an underline.

underline_spacing_t

enum class orcus::spreadsheet::underline_spacing_t

Underline style related to how it is applied in relation to the spacing of the text and the field it is in.

Note

ODS format makes extensive use of this attribute type.

Values:

enumerator continuous

Underline is applied to both words and spaces.

enumerator skip_white_space

Underline is applied only to words, and not to the spaces between them.

enumerator continuous_over_field

Underline is applied to the entire width of a field that houses the text.

Note

For now this is specific to Excel, and is referred to as “accounting” in Excel.

underline_style_t

enum class orcus::spreadsheet::underline_style_t

Style of an underline applied to a cell value.

Values:

enumerator none

Underline is absent.

enumerator solid

Line is continuous.

enumerator dotted

Underline is dotted.

enumerator dash

Underline is dashed.

enumerator long_dash

Underline consists of repeated long dash segments.

enumerator dot_dash

Underline consists of repeated dot and dash segments.

enumerator dot_dot_dash

Underline consists of repeated dot, dot and dash segments.

enumerator wave

Underline is waved.

underline_thickness_t

enum class orcus::spreadsheet::underline_thickness_t

Thickness of an underline. When the enum value is either percent, positive_integer, or positive_length, the actual value should be given separately.

Note

For now ODS is the only format that makes use of this attribute type. In ODS, the corresponding attribute is referred to as “width”. The automatic enum member corresponds with the “auto” text value, which could not be used since it’s a keyword in C++.

Values:

enumerator none
enumerator automatic
enumerator bold
enumerator dash
enumerator medium
enumerator thick
enumerator thin
enumerator percent
enumerator positive_integer
enumerator positive_length

ver_alignment_t

enum class orcus::spreadsheet::ver_alignment_t

Type of vertical alignment applied to a cell content.

Values:

enumerator unknown
enumerator top
enumerator middle
enumerator bottom
enumerator justified
enumerator distributed

xf_category_t

enum class orcus::spreadsheet::xf_category_t

Cell format categories. The abbreviation “xf” stands for “cell format” where the “x” is short for cell.

Values:

enumerator unknown
enumerator cell

Direct cell format, also often referenced as xf.

enumerator cell_style

Cell format for named styles.

enumerator differential

Incremental cell format, also referenced as dxf.

Type aliases

col_t

using orcus::spreadsheet::col_t = int32_t

Column ID type.

col_width_t

using orcus::spreadsheet::col_width_t = uint16_t

Type for column width values. Column width values are stored in twips.

color_elem_t

using orcus::spreadsheet::color_elem_t = uint8_t

Individual color element type.

format_runs_t

using orcus::spreadsheet::format_runs_t = std::vector<format_run_t>

Collection of format properties of a string.

pivot_cache_id_t

using orcus::spreadsheet::pivot_cache_id_t = uint32_t

Pivot cache ID type.

pivot_cache_indices_t

using orcus::spreadsheet::pivot_cache_indices_t = std::vector<size_t>

pivot_cache_items_t

using orcus::spreadsheet::pivot_cache_items_t = std::vector<pivot_cache_item_t>

pivot_cache_record_t

using orcus::spreadsheet::pivot_cache_record_t = std::vector<pivot_cache_record_value_t>

row_height_t

using orcus::spreadsheet::row_height_t = uint16_t

Type for row height values. Row height values are stored in twips.

row_t

using orcus::spreadsheet::row_t = int32_t

Row ID type.

sheet_t

using orcus::spreadsheet::sheet_t = int32_t

Sheet ID type.

string_id_t

using orcus::spreadsheet::string_id_t = uint32_t

Type for string ID’s for string cells.

Functions

get_default_column_width

col_width_t orcus::spreadsheet::get_default_column_width()

Get the special column width value that represents the default column width. The value itself is not to be used as an actual width value.

Returns:

value that represents the default column width.

get_default_row_height

row_height_t orcus::spreadsheet::get_default_row_height()

Get the special row height value that represents the default row height. The value itself is not to be used as an actual row height value.

Returns:

value that represents the default row height.

to_color_rgb

color_rgb_t orcus::spreadsheet::to_color_rgb(std::string_view s)

Convert a string representation of a RGB value to an equivalent struct value. The string representation is expected to be a 6 digit hexadecimal value string that may or may not be prefixed with a ‘#’.

Parameters:

s – string representation of the RGB value.

Returns:

struct value representing an RGB value.

to_color_rgb_from_name

color_rgb_t orcus::spreadsheet::to_color_rgb_from_name(std::string_view s)

Convert a color name to an RGB value. It supports SVG 1.0 color keyword names minus those gray colors with ‘grey’ spelling variants. Note that the name must be all in lowercase.

Parameters:

s – color name.

Returns:

struct value representing an RGB value.

to_error_value_enum

error_value_t orcus::spreadsheet::to_error_value_enum(std::string_view s)

Convert a string representation of a error value to its equivalent enum value.

Parameters:

s – error value string.

Returns:

enum value representing the error value.

to_formula_error_policy

formula_error_policy_t orcus::spreadsheet::to_formula_error_policy(std::string_view s)

Convert a formula error policy name to its enum value equivalent.

Parameters:

s – policy name.

Returns:

enum value equivalent for the original error policy name.

to_pivot_cache_group_by_enum

pivot_cache_group_by_t orcus::spreadsheet::to_pivot_cache_group_by_enum(std::string_view s)

Convert a string representation of a pivot cache group-by type to its equivalent enum value.

Parameters:

s – string value for pivot cache group-by type.

Returns:

enum value representing the pivot cache group-by type.

to_rc_address

address_t orcus::spreadsheet::to_rc_address(const src_address_t &r)

Convert a 3-dimensional cell address to a 2-dimensional counterpart by dropping the sheet index.

to_rc_range

range_t orcus::spreadsheet::to_rc_range(const src_range_t &r)

Convert a 3-dimensional cell range address to a 2-dimensional counterpart by dropping the sheet indices.

to_totals_row_function_enum

totals_row_function_t orcus::spreadsheet::to_totals_row_function_enum(std::string_view s)

Convert a string representation of a totals row function name to its equivalent enum value.

Parameters:

s – string value for totals row function name.

Returns:

enum value representing the totals row function.

Struct

address_t

struct address_t

Stores a 2-dimensional cell address.

Public Members

row_t row
col_t column

auto_filter_t

struct auto_filter_t

Data for a single auto-filter entry. An auto-filter can belong to either a sheet or a table.

Public Functions

auto_filter_t()
auto_filter_t(const auto_filter_t &other) = delete
auto_filter_t(auto_filter_t &&other)
~auto_filter_t()
auto_filter_t &operator=(const auto_filter_t &other) = delete
auto_filter_t &operator=(auto_filter_t &&other)
void reset()
void swap(auto_filter_t &other)

Public Members

ixion::abs_rc_range_t range
filter_node_t root

border_attrs_t

struct border_attrs_t

Attributes for a single border.

Public Functions

border_attrs_t()
void reset()

Public Members

std::optional<border_style_t> style
std::optional<color_t> border_color
std::optional<length_t> border_width

border_t

struct border_t

Style record for the borders of a single cell.

Public Functions

border_t()
void reset()

Public Members

border_attrs_t top
border_attrs_t bottom
border_attrs_t left
border_attrs_t right
border_attrs_t diagonal
border_attrs_t diagonal_bl_tr
border_attrs_t diagonal_tl_br

cell_format_t

struct cell_format_t

Format attributes for a single cell. It references the format entries via integer indices, with some exceptions.

Public Functions

cell_format_t()
void reset()

Public Members

std::size_t font

ID of a font style record.

std::size_t fill

ID of a fill style record.

std::size_t border

ID of a border style record.

std::size_t protection

ID for a cell protection record.

std::size_t number_format

ID for a number format record.

std::size_t style_xf

ID for a parent named style.

hor_alignment_t hor_align

Horizontal alignment of a cell.

ver_alignment_t ver_align

Vertical alignment of a cell.

std::optional<bool> wrap_text

Flag on whether or not wrap text is enabled.

std::optional<bool> shrink_to_fit

Flag on whether or not shrink to fit is enabled.

bool apply_num_format
bool apply_font
bool apply_fill
bool apply_border
bool apply_alignment
bool apply_protection

cell_style_t

struct cell_style_t

Attributes of a named cell style.

Refer to orcus::spreadsheet::iface::import_cell_style for how the data members of this struct are used in practice.

Public Functions

cell_style_t()
void reset()

Public Members

std::string_view name
std::string_view display_name
std::size_t xf
std::size_t builtin
std::string_view parent_name

color_rgb_t

struct color_rgb_t

Stores a color value in RGB format.

Public Members

color_elem_t red
color_elem_t green
color_elem_t blue

color_t

struct color_t

Stores a color value in ARGB format. Each color component ranges from 0 to 255 (8-bit).

Public Functions

color_t()
color_t(color_elem_t _red, color_elem_t _green, color_elem_t _blue)
color_t(color_elem_t _alpha, color_elem_t _red, color_elem_t _green, color_elem_t _blue)
void reset()
bool operator==(const color_t &other) const
bool operator!=(const color_t &other) const

Public Members

color_elem_t alpha
color_elem_t red
color_elem_t green
color_elem_t blue

document_config

struct document_config

Public Functions

document_config()
document_config(const document_config &r)
~document_config()
document_config &operator=(const document_config &r)

Public Members

int8_t output_precision

Precision to use when converting numeric values to their string representations. A negative value indicates the precision is not being specified.

fill_t

struct fill_t

Fill style record.

Public Functions

fill_t()
void reset()

Public Members

std::optional<fill_pattern_t> pattern_type
std::optional<color_t> fg_color
std::optional<color_t> bg_color

font_t

struct font_t

Font style record.

Public Functions

font_t()
font_t(const font_t &other)
~font_t()
font_t &operator=(const font_t &other)
bool operator==(const font_t &other) const
bool operator!=(const font_t &other) const
void reset()

Public Members

std::optional<std::string_view> name
std::optional<std::string_view> name_asian
std::optional<std::string_view> name_complex
std::optional<double> size
std::optional<double> size_asian
std::optional<double> size_complex
std::optional<bool> bold
std::optional<bool> bold_asian
std::optional<bool> bold_complex
std::optional<bool> italic
std::optional<bool> italic_asian
std::optional<bool> italic_complex
std::optional<color_t> color
underline_t underline
strikethrough_t strikethrough
struct hash

Public Functions

std::size_t operator()(const font_t &v) const

format_run_t

struct format_run_t

Contains formatting properties of a section of a string. This is used in the storage of rich-text strings.

Public Functions

format_run_t()
format_run_t(const format_run_t &other)
~format_run_t()
format_run_t &operator=(const format_run_t &other)
void reset()

Reset the properties to unformatted state.

bool formatted() const

Query whether or not the section contains non-default format properties.

Returns:

true of it’s formatted, otherwise false.

Public Members

std::size_t pos = 0

Position of the section where the formatting starts.

std::size_t size = 0

Length of the section.

std::optional<std::string_view> font

Name of the font.

std::optional<double> font_size

Size of the font.

std::optional<color_t> color

Color of the section.

std::optional<bool> bold

Whether or not the font is bold.

std::optional<bool> italic

Whether or not the font is italic.

std::optional<bool> superscript

Whether or not the font has superscript applied.

std::optional<bool> subscript

Whether or not the font has subscript applied.

strikethrough_t strikethrough

Strikethrough attributes.

underline_t underline

frozen_pane_t

struct frozen_pane_t

Store the state of a frozen sheet view.

Public Members

col_t visible_columns

The number of visible columns in the top-left pane.

row_t visible_rows

The number of visible rows in the top-left pane.

address_t top_left_cell

The position of the top-left cell in the bottom-right pane.

import_factory_config

struct import_factory_config

Public Functions

import_factory_config()
import_factory_config(const import_factory_config &other)
~import_factory_config()
import_factory_config &operator=(const import_factory_config &other)

Public Members

bool enable_font_cache = true

When the font cache is enabled, the import factory checks each incoming font entry against the pool of existing font entries and insert it only when an equal entry doesn’t already exist in the pool.

Note

It should not be enabled for a file format that already has font entries normalized, such as xlsx.

number_format_t

struct number_format_t

Style record for a number format.

Public Functions

number_format_t()
void reset()
bool operator==(const number_format_t &other) const noexcept
bool operator!=(const number_format_t &other) const noexcept

Public Members

std::optional<std::size_t> identifier
std::optional<std::string_view> format_string

pivot_cache_field_t

struct pivot_cache_field_t

Public Functions

pivot_cache_field_t()
pivot_cache_field_t(std::string_view _name)
pivot_cache_field_t(const pivot_cache_field_t &other)
pivot_cache_field_t(pivot_cache_field_t &&other)

Public Members

std::string_view name

Field name. It must be interned with the string pool belonging to the document.

pivot_cache_items_t items
std::optional<double> min_value
std::optional<double> max_value
std::optional<date_time_t> min_date
std::optional<date_time_t> max_date
std::unique_ptr<pivot_cache_group_data_t> group_data

pivot_cache_group_data_t

struct pivot_cache_group_data_t

Group data for a pivot cache field.

Public Functions

pivot_cache_group_data_t(size_t _base_field)
pivot_cache_group_data_t(const pivot_cache_group_data_t &other)
pivot_cache_group_data_t(pivot_cache_group_data_t &&other)
pivot_cache_group_data_t() = delete

Public Members

pivot_cache_indices_t base_to_group_indices

Mapping of base field member indices to the group field item indices.

std::optional<range_grouping_type> range_grouping
pivot_cache_items_t items

Individual items comprising the group.

size_t base_field

0-based index of the base field.

struct range_grouping_type

Public Functions

range_grouping_type() = default
range_grouping_type(const range_grouping_type &other) = default

Public Members

pivot_cache_group_by_t group_by = pivot_cache_group_by_t::range
bool auto_start = true
bool auto_end = true
double start = 0.0
double end = 0.0
double interval = 1.0
date_time_t start_date
date_time_t end_date

pivot_cache_item_t

struct pivot_cache_item_t

Public Types

enum class item_type

Values:

enumerator unknown
enumerator boolean
enumerator date_time
enumerator character
enumerator numeric
enumerator blank
enumerator error
using value_type = std::variant<bool, double, std::string_view, date_time_t, error_value_t>

Public Functions

pivot_cache_item_t()
pivot_cache_item_t(std::string_view s)
pivot_cache_item_t(double numeric)
pivot_cache_item_t(bool boolean)
pivot_cache_item_t(const date_time_t &date_time)
pivot_cache_item_t(error_value_t error)
pivot_cache_item_t(const pivot_cache_item_t &other)
pivot_cache_item_t(pivot_cache_item_t &&other)
bool operator<(const pivot_cache_item_t &other) const
bool operator==(const pivot_cache_item_t &other) const
pivot_cache_item_t &operator=(pivot_cache_item_t other)
void swap(pivot_cache_item_t &other)

Public Members

item_type type
value_type value

pivot_cache_record_value_t

struct pivot_cache_record_value_t

Public Types

enum class record_type

Values:

enumerator unknown
enumerator boolean
enumerator date_time
enumerator character
enumerator numeric
enumerator blank
enumerator error
enumerator shared_item_index
using value_type = std::variant<bool, double, std::size_t, std::string_view, date_time_t>

Public Functions

pivot_cache_record_value_t()
pivot_cache_record_value_t(std::string_view s)
pivot_cache_record_value_t(double v)
pivot_cache_record_value_t(size_t index)
bool operator==(const pivot_cache_record_value_t &other) const
bool operator!=(const pivot_cache_record_value_t &other) const

Public Members

record_type type
value_type value

protection_t

struct protection_t

Style record for cell protection attributes.

Public Functions

protection_t()
void reset()

Public Members

std::optional<bool> locked
std::optional<bool> hidden
std::optional<bool> print_content
std::optional<bool> formula_hidden

range_size_t

struct range_size_t

Stores the size of a range of a spreadsheet.

Public Members

row_t rows
col_t columns

range_t

struct range_t

Stores a 2-dimensional cell range by storing the positions of the top-left and bottom-right corners of the range.

Public Members

address_t first
address_t last

split_pane_t

struct split_pane_t

Store information about the state of a split sheet view.

Public Members

double hor_split

Horizontal distance to the vertical split bar in 1/20th of a point, or 0 if not horizontally split.

double ver_split

Vertical distance to the horizontal split bar in 1/20th of a point, or 0 if not vertically split.

address_t top_left_cell

Top-left visible cell of the bottom-right pane. This value is valid only when either the horizontal distance or the vertical distance is non-zero.

src_address_t

struct src_address_t

Stores 3-dimensional cell address. The ‘src’ abbreviation stands for sheet-row-column.

Public Members

sheet_t sheet
row_t row
col_t column

src_range_t

struct src_range_t

Stores 3-dimensional cell range address. The ‘src’ abbreviation stands for sheet-row-column.

Public Members

src_address_t first
src_address_t last

strikethrough_t

struct strikethrough_t

Public Functions

strikethrough_t()
strikethrough_t(const strikethrough_t &other)
~strikethrough_t()
strikethrough_t &operator=(const strikethrough_t &other)
bool operator==(const strikethrough_t &other) const
bool operator!=(const strikethrough_t &other) const
void reset()
bool has_value() const

Public Members

std::optional<strikethrough_style_t> style
std::optional<strikethrough_type_t> type
std::optional<strikethrough_width_t> width
std::optional<strikethrough_text_t> text

table_column_t

struct table_column_t

Single column entry in table.

Public Functions

table_column_t()
table_column_t(const table_column_t &other)
~table_column_t()
table_column_t &operator=(const table_column_t &other)
void reset()

Public Members

std::size_t identifier
std::string_view name
std::string_view totals_row_label
totals_row_function_t totals_row_function

table_style_t

struct table_style_t

Table style information.

Public Functions

table_style_t()
table_style_t(const table_style_t &other)
~table_style_t()
table_style_t &operator=(const table_style_t &other)
void reset()

Public Members

std::string_view name
bool show_first_column
bool show_last_column
bool show_row_stripes
bool show_column_stripes

table_t

struct table_t

Single table entry. A table is a range in a spreadsheet that represents a single set of data that can be used as a data source.

Public Types

typedef std::vector<table_column_t> columns_type

Public Functions

table_t()
table_t(const table_t &other) = delete
table_t(table_t &&other)
~table_t()
table_t &operator=(const table_t &other) = delete
table_t &operator=(table_t &&other)
void reset()

Public Members

std::size_t identifier
std::string_view name
std::string_view display_name
ixion::abs_range_t range
std::size_t totals_row_count
auto_filter_t filter
columns_type columns
table_style_t style

underline_t

struct underline_t

Public Functions

underline_t()
underline_t(const underline_t &other)
~underline_t()
underline_t &operator=(const underline_t &other)
bool operator==(const underline_t &other) const
bool operator!=(const underline_t &other) const
void reset()
bool has_value() const

Public Members

std::optional<underline_style_t> style
std::optional<underline_thickness_t> thickness
std::optional<underline_spacing_t> spacing
std::optional<underline_count_t> count
std::optional<color_t> color

Classes

document

class document : public orcus::iface::document_dumper

Store spreadsheet document content. It uses the model_context class from the ixion library to store raw cell values required in the computation of formula expressions.

Public Functions

document(const document&) = delete
document &operator=(const document&) = delete
document(const range_size_t &sheet_size)
~document()
virtual void dump(dump_format_t format, const std::string &output) const override

See iface::document_dumper.

virtual void dump_check(std::ostream &os) const override

See iface::document_dumper.

shared_strings &get_shared_strings()
const shared_strings &get_shared_strings() const
styles &get_styles()
const styles &get_styles() const
pivot_collection &get_pivot_collection()
const pivot_collection &get_pivot_collection() const
sheet *append_sheet(std::string_view sheet_name)
sheet *get_sheet(std::string_view sheet_name)
const sheet *get_sheet(std::string_view sheet_name) const
sheet *get_sheet(sheet_t sheet_pos)
const sheet *get_sheet(sheet_t sheet_pos) const
void clear()

Clear document content, to make it empty.

void recalc_formula_cells()

Calculate those formula cells that have been newly inserted and have not yet been calculated.

sheet_t get_sheet_index(std::string_view name) const
std::string_view get_sheet_name(sheet_t sheet_pos) const
void set_sheet_name(sheet_t sheet_pos, std::string name)

Set a new name to a sheet.

Parameters:
  • sheet_pos – 0-based position of a sheet.

  • name – New name to set to a sheet.

range_size_t get_sheet_size() const
void set_sheet_size(const range_size_t &sheet_size)
size_t get_sheet_count() const
void set_origin_date(int year, int month, int day)
date_time_t get_origin_date() const
void set_formula_grammar(formula_grammar_t grammar)
formula_grammar_t get_formula_grammar() const
const ixion::formula_name_resolver *get_formula_name_resolver(formula_ref_context_t cxt) const
ixion::model_context &get_model_context()
const ixion::model_context &get_model_context() const
const document_config &get_config() const
void set_config(const document_config &cfg)
string_pool &get_string_pool()
const string_pool &get_string_pool() const
tables &get_tables()
const tables &get_tables() const

export_factory

class export_factory : public orcus::spreadsheet::iface::export_factory

Wraps document store and faciliates export of its content.

Warning

It currently provides very limited functionality especially when compared to that of the import_factory.

Public Functions

export_factory(const document &doc)
virtual ~export_factory()
virtual const iface::export_sheet *get_sheet(std::string_view sheet_name) const override

Obtain an interface for exporting sheet content.

Parameters:

sheet_name – name of the sheet to export.

Returns:

pointer to an interface for exporting sheet content.

filter_item_set_t

class filter_item_set_t : public orcus::spreadsheet::filterable

Public Functions

filter_item_set_t()
filter_item_set_t(col_t _field)
filter_item_set_t(col_t field, std::initializer_list<std::string_view> values)
filter_item_set_t(const filter_item_set_t &other)
filter_item_set_t(filter_item_set_t &&other)
~filter_item_set_t() override
col_t field() const
const std::unordered_set<std::string_view> &values() const
void insert(std::string_view value)
filter_item_set_t &operator=(const filter_item_set_t &other)
filter_item_set_t &operator=(filter_item_set_t &&other)
void reset()
void swap(filter_item_set_t &other) noexcept
bool operator==(const filter_item_set_t &other) const
bool operator!=(const filter_item_set_t &other) const

filter_item_t

class filter_item_t : public orcus::spreadsheet::filterable

Represents a single filtering criterion for a field.

Public Functions

filter_item_t()
filter_item_t(col_t _field, auto_filter_op_t _op)
filter_item_t(col_t _field, auto_filter_op_t _op, double v)
filter_item_t(col_t _field, auto_filter_op_t _op, std::string_view v)
filter_item_t(col_t _field, auto_filter_op_t _op, std::string_view v, bool _regex)
filter_item_t(const filter_item_t &other)
~filter_item_t() override
col_t field() const
auto_filter_op_t op() const
filter_value_t value() const
bool regex() const
filter_item_t &operator=(const filter_item_t &other)
void swap(filter_item_t &other) noexcept
bool operator==(const filter_item_t &other) const
bool operator!=(const filter_item_t &other) const
bool operator<(const filter_item_t &other) const

filter_node_t

class filter_node_t : public orcus::spreadsheet::filterable

Represents a single node in a boolean tree of filtering criteria connected with boolean operators.

Public Functions

filter_node_t()
filter_node_t(auto_filter_node_op_t _op)
filter_node_t(const filter_node_t &other) = delete
filter_node_t(filter_node_t &&other)
~filter_node_t() override
filter_node_t &operator=(const filter_node_t &other) = delete
filter_node_t &operator=(filter_node_t &&other)
auto_filter_node_op_t op() const noexcept
std::size_t size() const noexcept

Returns the number of child filterables.

bool empty() const noexcept
const filterable *at(std::size_t pos) const

Returns the pointer to a child filterable at specified position.

void append(filter_node_t child)
void append(filter_item_t child)
void append(filter_item_set_t child)
void reset()
void swap(filter_node_t &other) noexcept

filter_value_t

class filter_value_t

Represents a single value associated with a filtering criterion. It can store either a numeric value, a string value, or an empty state.

Public Types

enum class value_type

Values:

enumerator empty
enumerator numeric
enumerator string

Public Functions

filter_value_t()
filter_value_t(double v)
filter_value_t(std::string_view v)
filter_value_t(const filter_value_t &other)
~filter_value_t()
bool operator==(const filter_value_t &other) const
bool operator!=(const filter_value_t &other) const
bool operator<(const filter_value_t &other) const
filter_value_t &operator=(const filter_value_t &other)
value_type type() const noexcept
double numeric() const
std::string_view string() const
void swap(filter_value_t &other) noexcept

filterable

class filterable

Subclassed by orcus::spreadsheet::filter_item_set_t, orcus::spreadsheet::filter_item_t, orcus::spreadsheet::filter_node_t

Public Functions

virtual ~filterable()

import_factory

class import_factory : public orcus::spreadsheet::iface::import_factory

Wraps document and view stores. This is to be used by the import filter to populate the document and view stores.

Public Functions

import_factory(document &doc)
import_factory(document &doc, view &view_store)
virtual ~import_factory()
virtual iface::import_global_settings *get_global_settings() override

Obtain an optional interface for global settings, which the import filter uses to specify global filter settings that may affect how certain values and properties should be processed. The implementor can use this interface to decide how to process relevant values and properties.

Returns:

pointer to the global settings interface, or a nullptr if the implementor doesn’t support it.

virtual iface::import_shared_strings *get_shared_strings() override

Obtain an optional interface for importing shared strings for string cells. Implementing this interface is required in order to import string cell values.

Returns:

pointer to the shared strings interface, or a nullptr if the implementor doesn’t support it.

virtual iface::import_styles *get_styles() override

Obtain an optional interface for importing styles used to add formatting properties to cell values.

Returns:

pointer to the styles interface, or a nullptr if the implementor doesn’t support it.

virtual iface::import_named_expression *get_named_expression() override

Obtain an optional interface for importing global named expressions.

Note that import_sheet also provides the same interface, but its interface is for importing sheet-local named expressions.

Returns:

pointer to the global named expression interface, or a nullptr if the implementor doesn’t support it.

virtual iface::import_reference_resolver *get_reference_resolver(formula_ref_context_t cxt) override

Obtain an optional interface for resolving cell and cell-range references from string values.

Parameters:

cxt – context in which the formula expression containing the references to be resolved occurs.

Returns:

pointer to the reference resolve interfance, or a nullptr if the implementor doesn’t support it.

virtual iface::import_pivot_cache_definition *create_pivot_cache_definition(orcus::spreadsheet::pivot_cache_id_t cache_id) override

Obtain an optional interface for pivot cache definition import for a specified cache ID. In case a pivot cache alrady exists for the passed ID, the implementor should overwrite the existing cache with a brand-new cache instance.

Parameters:

cache_id – numeric ID associated with the pivot cache.

Returns:

pointer to the pivot cache interface, or a nullptr if the implementor doesn’t support pivot cache import.

virtual iface::import_pivot_cache_records *create_pivot_cache_records(orcus::spreadsheet::pivot_cache_id_t cache_id) override

Obtain an optional interface for pivot cache records import for a specified cache ID.

Parameters:

cache_id – numeric ID associated with the pivot cache.

Returns:

pointer to the pivot cache records interface, or a nullptr if the implementor doesn’t support pivot cache import.

virtual iface::import_sheet *append_sheet(sheet_t sheet_index, std::string_view name) override

Append a sheet with a specified sheet position index and name and return an interface for importing its content. The implementor can use a call to this method as a signal to create and append a new sheet instance to the document store.

Parameters:
  • sheet_index – position index of the sheet to be appended. It is 0-based i.e. the first sheet to be appended will have an index value of 0.

  • name – sheet name.

Returns:

pointer to the sheet instance, or a nullptr if the implementor doesn’t support it. Note, however, that if the implementor doesn’t support this interface, no cell values will get imported.

virtual iface::import_sheet *get_sheet(std::string_view name) override

Get a sheet instance by name. The import filter may use this method to get access to an existing sheet after it has been created.

Parameters:

name – sheet name.

Returns:

pointer to the sheet instance whose name matches the name passed to this method. It returns a nullptr if no sheet instance exists by the specified name.

virtual iface::import_sheet *get_sheet(sheet_t sheet_index) override

Retrieve a sheet instance by a specified numerical sheet index.

Parameters:

sheet_index – sheet index.

Returns:

pointer to the sheet instance, or a nullptr if no sheet instance exists at the specified sheet index.

virtual void finalize() override

The import filter calls this method after completing its import, to give the implementor a chance to perform post-processing.

void set_config(const import_factory_config &config)
void set_default_row_size(row_t row_size)
void set_default_column_size(col_t col_size)
void set_character_set(character_set_t charset)
character_set_t get_character_set() const
void set_recalc_formula_cells(bool b)

When setting this flag to true, those formula cells with no cached results will be re-calculated upon loading.

Parameters:

b – value of this flag.

void set_formula_error_policy(formula_error_policy_t policy)

import_styles

class import_styles : public orcus::spreadsheet::iface::import_styles

Wraps styles store. This is to be used by an import styles parser to populate the styles store.

Public Functions

import_styles(styles &styles_store, string_pool &sp)
import_styles(std::shared_ptr<import_factory_config> config, styles &styles_store, string_pool &sp)
virtual ~import_styles() override
virtual iface::import_font_style *start_font_style() override

Signal the start of the import of font style attributes, and return a pointer to the interface instance for importing the attributes.

Note

Note that the import_styles implementer must return a non-null pointer.

Returns:

pointer to the interface instance for importing font style attributes.

virtual iface::import_fill_style *start_fill_style() override

Signal the start of the import of fill style attributes, and return a pointer to the interface instance for importing the attributes.

Note

Note that the import_styles implementer must return a non-null pointer.

Returns:

pointer to the interface instance for importing fill style attributes.

virtual iface::import_border_style *start_border_style() override

Signal the start of the import of border style attributes, and return a pointer to the interface instance for importing the attributes.

Note

Note that the import_styles implementer must return a non-null pointer.

Returns:

pointer to the interface instance for importing border style attributes.

virtual iface::import_cell_protection *start_cell_protection() override

Signal the start of the import of cell protection attributes, and return a pointer to the interface instance for importing the attributes.

Note

Note that the import_styles implementer must return a non-null pointer.

Returns:

pointer to the interface instance for importing cell protection attributes.

virtual iface::import_number_format *start_number_format() override

Signal the start of the import of number format attributes and return a pointer to the interface instance for importing the attributes.

Note

Note that the import_styles implementer must return a non-null pointer.

Returns:

pointer to the interface instance for importing number format attributes.

virtual iface::import_xf *start_xf(xf_category_t cat) override

Signal the start of the import of cell format (xf) indices that each reference different format attributes in their respective pools, and return a pointer to the interface instance for importing the indices.

Note

Note that the import_styles implementer must return a non-null pointer.

Returns:

pointer to the interface instance for importing cell format (xf) indices.

virtual iface::import_cell_style *start_cell_style() override

Signal the start of the import of named cell style information, and return a pointer to the interface instance for importing the information.

Note

Note that the import_styles implementer must return a non-null pointer.

Returns:

pointer to the interface instance for importing named cell style information.

virtual void set_font_count(size_t n) override

Set the total number of font styles. This may be called before importing any of the font styles. This will give the implementer a chance to allocate storage. Note that it may not always be called.

Parameters:

n – number of font styles.

virtual void set_fill_count(size_t n) override

Set the total number of fill styles. This may be called before importing any of the fill styles. This will give the implementer a chance to allocate storage. Note that it may not always be called.

Parameters:

n – number of fill styles.

virtual void set_border_count(size_t n) override

Set the total number of border styles. This may be called before importing any of the border styles. This will give the implementer a chance to allocate storage. Note that it may not always be called.

Parameters:

n – number of border styles.

virtual void set_number_format_count(size_t n) override

Set the total number of number format styles. This may be called before importing any of the number format styles. This will give the implementer a chance to allocate storage. Note that it may not always be called.

Parameters:

n – number of number format styles.

virtual void set_xf_count(xf_category_t cat, size_t n) override

Set the total number of cell format styles for a specified cell format category. This may be called before importing any of the cell format styles for the specified category. This will give the implementer a chance to allocate storage. Note that it may not always be called.

Parameters:
  • cat – cell format category.

  • n – number of cell formats styles for the specified cell format category.

virtual void set_cell_style_count(size_t n) override

Set the total number of named cell styles. This may be called before importing any cell styles to give the implementer a chance to allocate storage. Note that it may not always be called.

Parameters:

n – number of named cell styles.

pivot_cache

class pivot_cache

Public Types

using fields_type = std::vector<pivot_cache_field_t>
using records_type = std::vector<pivot_cache_record_t>

Public Functions

pivot_cache(pivot_cache_id_t cache_id, string_pool &sp)
~pivot_cache()
void insert_fields(fields_type fields)

Bulk-insert all the fields in one step. Note that this will replace any pre-existing fields if any.

Parameters:

fields – field instances to move into storage.

void insert_records(records_type record)
size_t get_field_count() const
const pivot_cache_field_t *get_field(size_t index) const

Retrieve a field data by its index.

Parameters:

index – index of the field to retrieve.

Returns:

pointer to the field instance, or nullptr if the index is out-of-range.

pivot_cache_id_t get_id() const
const records_type &get_all_records() const

pivot_collection

class pivot_collection

Public Functions

pivot_collection(document &doc)
~pivot_collection()
void insert_worksheet_cache(std::string_view sheet_name, const ixion::abs_range_t &range, std::unique_ptr<pivot_cache> &&cache)

Insert a new pivot cache associated with a worksheet source.

Parameters:
  • sheet_name – name of the sheet where the source data is.

  • range – range of the source data. Note that the sheet indices are not used.

  • cache – pivot cache instance to store.

void insert_worksheet_cache(std::string_view table_name, std::unique_ptr<pivot_cache> &&cache)

Insert a new pivot cache associated with a table name.

Parameters:
  • table_name – source table name.

  • cache – pivot cache instance to store.

size_t get_cache_count() const

Count the number of pivot caches currently stored.

Returns:

number of pivot caches currently stored in the document.

const pivot_cache *get_cache(std::string_view sheet_name, const ixion::abs_range_t &range) const
pivot_cache *get_cache(pivot_cache_id_t cache_id)
const pivot_cache *get_cache(pivot_cache_id_t cache_id) const

shared_strings

class shared_strings

This class manages access to a pool of shared string instances for both unformatted strings and rich-text strings. The underlying string values themselves are stored externally in the ixion::model_context instance which this class references; this class itself only stores the format properties of the rich-text strings.

Public Functions

shared_strings() = delete
shared_strings(const shared_strings&) = delete
shared_strings &operator=(const shared_strings&) = delete
shared_strings(ixion::model_context &cxt)
~shared_strings()
void set_format_runs(std::size_t sindex, std::unique_ptr<format_runs_t> runs)

Set the entire format runs of a string.

Parameters:
  • sindex – index of the string to associate the format runs with.

  • runs – format runs.

const format_runs_t *get_format_runs(std::size_t index) const

Get the entire format runs of a string.

Parameters:

index – index of the string to get the format runs of.

Returns:

pointer to the format runs, or nullptr if no format runs exist for the specified string index.

const std::string *get_string(std::size_t index) const

Get an underlying string value associated with an index.

Parameters:

index – index of a string value.

Returns:

pointer to a string value associated with the index, or nullptr in case of an invalid string index.

void dump(std::ostream &os) const

sheet

class sheet

This class represents a single sheet instance in the internal document model.

Public Functions

sheet(document &doc, sheet_t sheet_index)
~sheet() noexcept
void set_auto(row_t row, col_t col, std::string_view s)
void set_string(row_t row, col_t col, string_id_t sindex)
void set_value(row_t row, col_t col, double value)
void set_bool(row_t row, col_t col, bool value)
void set_date_time(row_t row, col_t col, int year, int month, int day, int hour, int minute, double second)
void set_format(row_t row, col_t col, size_t index)
void set_format(row_t row_start, col_t col_start, row_t row_end, col_t col_end, size_t index)
void set_column_format(col_t col, col_t col_span, std::size_t index)
void set_row_format(row_t row, std::size_t index)
void set_formula(row_t row, col_t col, const ixion::formula_tokens_store_ptr_t &tokens)
void set_formula(row_t row, col_t col, const ixion::formula_tokens_store_ptr_t &tokens, ixion::formula_result result)
void set_grouped_formula(const range_t &range, ixion::formula_tokens_t tokens)
void set_grouped_formula(const range_t &range, ixion::formula_tokens_t tokens, ixion::formula_result result)
void set_col_width(col_t col, col_t col_span, col_width_t width)
col_width_t get_col_width(col_t col, col_t *col_start, col_t *col_end) const

Get column width in twips.

Parameters:
  • col – column index

  • col_start – pointer to a variable to store the index of the starting column of the range with the same width. Pass nullptr if the caller doesn’t need this information.

  • col_end – pointer to a variable to store the index of the ending column plus one, of the range with the same width. Pass nullptr if the caller doesn’t need this information.

Returns:

width of the specified column index (in twips).

void set_col_hidden(col_t col, col_t col_span, bool hidden)
bool is_col_hidden(col_t col, col_t *col_start, col_t *col_end) const
void set_row_height(row_t row, row_t row_span, row_height_t height)
row_height_t get_row_height(row_t row, row_t *row_start, row_t *row_end) const
void set_row_hidden(row_t row, row_t row_span, bool hidden)
bool is_row_hidden(row_t row, row_t *row_start, row_t *row_end) const
void set_merge_cell_range(const range_t &range)
void fill_down_cells(row_t src_row, col_t src_col, row_t range_size)
range_t get_merge_cell_range(row_t row, col_t col) const

Return the size of a merged cell range.

Parameters:
  • row – row position of the upper-left cell.

  • col – column position of the upper-left cell.

Returns:

merged cell range.

size_t get_string_identifier(row_t row, col_t col) const
void set_auto_filter(std::unique_ptr<auto_filter_t> filter)
const auto_filter_t *get_auto_filter() const
ixion::abs_range_t get_data_range() const

Return the smallest range that contains all non-empty cells in this sheet. The top-left corner of the returned range is always column 0 and row 0.

Returns:

smallest range that contains all non-empty cells.

sheet_t get_index() const
date_time_t get_date_time(row_t row, col_t col) const
void dump_flat(std::ostream &os) const
void dump_check(std::ostream &os, std::string_view sheet_name) const
void dump_html(std::ostream &os) const
void dump_json(std::ostream &os) const
void dump_csv(std::ostream &os) const
void dump_debug_state(const std::string &output_dir, std::string_view sheet_name) const
size_t get_cell_format(row_t row, col_t col) const

Get the cell format ID of specified cell.

Friends

friend struct detail::sheet_impl

sheet_view

class sheet_view

Public Functions

sheet_view(view &doc_view)
~sheet_view()
const range_t &get_selection(sheet_pane_t pos) const
void set_selection(sheet_pane_t pos, const range_t &range)
void set_active_pane(sheet_pane_t pos)
sheet_pane_t get_active_pane() const
void set_split_pane(double hor_split, double ver_split, const address_t &top_left_cell)
const split_pane_t &get_split_pane() const
void set_frozen_pane(col_t visible_cols, row_t visible_rows, const address_t &top_left_cell)
const frozen_pane_t &get_frozen_pane() const
view &get_document_view()

styles

class styles

Stores various styles records such that they can be referenced via integer indices.

Public Functions

styles()
~styles()
void reserve_font_store(size_t n)
std::size_t append_font(const font_t &font)
void reserve_fill_store(size_t n)
std::size_t append_fill(const fill_t &fill)
void reserve_border_store(size_t n)
std::size_t append_border(const border_t &border)
std::size_t append_protection(const protection_t &protection)
void reserve_number_format_store(size_t n)
std::size_t append_number_format(const number_format_t &nf)
void reserve_cell_style_format_store(size_t n)
size_t append_cell_style_format(const cell_format_t &cf)
void reserve_cell_format_store(size_t n)
size_t append_cell_format(const cell_format_t &cf)
void reserve_diff_cell_format_store(size_t n)
size_t append_diff_cell_format(const cell_format_t &cf)
void reserve_cell_style_store(size_t n)
void append_cell_style(const cell_style_t &cs)
const font_t *get_font(size_t index) const
const fill_t *get_fill(size_t index) const
const border_t *get_border(size_t index) const
const protection_t *get_protection(size_t index) const
const number_format_t *get_number_format(size_t index) const
const cell_format_t *get_cell_format(size_t index) const
const cell_format_t *get_cell_style_format(size_t index) const
const cell_format_t *get_dxf_format(size_t index) const
const cell_style_t *get_cell_style(size_t index) const
const cell_style_t *get_cell_style_by_xf(size_t xfid) const
size_t get_font_count() const
size_t get_fill_count() const
size_t get_border_count() const
size_t get_protection_count() const
size_t get_number_format_count() const
size_t get_cell_formats_count() const
size_t get_cell_style_formats_count() const
size_t get_dxf_count() const
size_t get_cell_styles_count() const
void clear()

tables

class tables

Public Functions

tables() = delete
tables(const tables&) = delete
~tables()
tables &operator=(const tables&) = delete
void insert(std::unique_ptr<table_t> p)

Insert a new table instance.

Parameters:

p – Table instance to insert.

std::weak_ptr<const table_t> get(std::string_view name) const

Get a structure containing properties of a named table.

Parameters:

name – Name of the table.

Returns:

Weak pointer to the structure containing the properties of a named table, or an empty pointer if no such table exists for the given name.

std::map<std::string_view, std::weak_ptr<const table_t>> get_by_sheet(sheet_t pos) const

Get all tables belonging to a certain sheet by sheet index.

Parameters:

pos – 0-based sheet index.

Returns:

Map containing pointers to all table instances belonging to specified sheet and their respective names as keys.

Friends

friend struct detail::document_impl

view

class view

Public Functions

view(document &doc)
~view()
sheet_view *get_or_create_sheet_view(sheet_t sheet)
const sheet_view *get_sheet_view(sheet_t sheet) const
void set_active_sheet(sheet_t sheet)
sheet_t get_active_sheet() const

Child namespaces