xlnt
Classes | Typedefs | Enumerations | Functions
xlnt Namespace Reference

Enumerates the possible types a cell can be determined by it's current value. More...

Classes

class  alignment
 Alignment options that determine how text should be displayed within a cell. More...
 
class  border
 Describes the border style of a particular cell. More...
 
class  calculation_properties
 Workbook file properties relating to calculations. More...
 
class  cell
 Describes a unit of data in a worksheet at a specific coordinate and its associated properties. More...
 
class  cell_iterator
 A cell iterator iterates over a 1D range by row or by column. More...
 
class  cell_reference
 An object used to refer to a cell. References have two parts, the column and the row. In Excel, the reference string A1 refers to the top-left-most cell. A cell_reference can be initialized from a string of this form or a 1-indexed ordered pair of the form column, row. More...
 
struct  cell_reference_hash
 Functor for hashing a cell reference. Allows for use of std::unordered_set<cell_reference, cel_reference_hash> and similar. More...
 
class  cell_vector
 A cell vector is a linear (1D) range of cells, either vertical or horizontal depending on the major order specified in the constructor. More...
 
class  color
 Colors can be applied to many parts of a cell's style. More...
 
struct  column_hash
 Functor for hashing a column. Allows for use of std::unordered_set<column_t, column_hash> and similar. More...
 
class  column_properties
 Properties applied to a column in a worksheet. Columns can have a size and a style. More...
 
class  column_t
 Columns can be referred to as a string A,B,...Z,AA,AB,..,ZZ,AAA,...,ZZZ or as a 1-indexed index. This class encapsulates both of these forms of column referencing and allows for conversions between them. More...
 
class  comment
 A comment can be applied to a cell to provide extra information about its contents. More...
 
class  condition
 
class  conditional_format
 Describes a conditional format that will be applied to all cells in the associated range that satisfy the condition. This can only be constructed using methods on worksheet or range. More...
 
class  const_cell_iterator
 A cell iterator iterates over a 1D range by row or by column. More...
 
class  const_range_iterator
 A const version of range_iterator which does not allow modification to the dereferenced cell_vector. More...
 
class  const_worksheet_iterator
 An iterator which is used to iterate over the worksheets in a const workbook. More...
 
struct  date
 A date is a specific day specified in terms of a year, month, and day. It can also be initialized as a number of days since a base date using date::from_number. IMPORTANT: The date could be in an empty/invalid state, so you may want to call is_null() before calling any functions! More...
 
struct  datetime
 A datetime is a combination of a date and a time. IMPORTANT: The datetime could be in an empty/invalid state, so you may want to call is_null() before calling any functions! More...
 
class  document_security
 Properties governing how the data in a workbook should be protected. These values can be ignored by consumers. More...
 
class  exception
 Parent type of all custom exceptions thrown in this library. More...
 
class  ext_list
 A list of xml extensions that may or may not be understood by the parser preservation is required for round-tripping even if extension is not understood [serialised: extLst] More...
 
class  external_book
 A reference to an external workbook for use in formulae. More...
 
class  fill
 Describes the fill style of a particular cell. More...
 
class  font
 Describes the font style of a particular cell. More...
 
class  format
 Describes the formatting of a particular cell. More...
 
class  gradient_fill
 Encapsulates a fill which transitions between colors at particular "stops". More...
 
class  header_footer
 Represents the header and footer of a sheet in a workbook. More...
 
class  hyperlink
 Describes a hyperlink pointing from a cell to another cell or a URL. More...
 
class  illegal_character
 The data submitted which cannot be used directly in Excel files. It must be removed or escaped. More...
 
class  indexed_color
 An indexed color encapsulates a simple index to a color in the indexedColors of the stylesheet. More...
 
class  invalid_attribute
 Exception when setting a class's attribute to an invalid value More...
 
class  invalid_cell_reference
 Exception for converting between numeric and A1-style cell references. More...
 
class  invalid_column_index
 Exception for bad column indices in A1-style cell references. More...
 
class  invalid_data_type
 Exception for any data type inconsistencies. More...
 
class  invalid_file
 Exception for trying to open a non-XLSX file. More...
 
class  invalid_parameter
 Exception for a bad parameter value More...
 
class  invalid_sheet_title
 Exception for bad sheet names. More...
 
class  key_not_found
 Exception for a key that doesn't exist in a container More...
 
class  manifest
 The manifest keeps track of all files in the OOXML package and their type and relationships. More...
 
class  named_range
 A 2D range of cells in a worksheet that is referred to by name. ws->range("A1:B2") could be replaced by ws->range("range1") More...
 
class  no_visible_worksheets
 Exception for a workbook with no visible worksheets More...
 
class  number_format
 Describes the number formatting applied to text and numbers within a certain cell. More...
 
class  optional
 Many settings in xlnt are allowed to not have a value set. This class encapsulates a value which may or may not be set. Memory is allocated within the optional class. More...
 
class  page_margins
 Describes the margins around a worksheet for printing. More...
 
struct  page_setup
 Describes how a worksheet will be converted into a page during printing. More...
 
struct  pane
 A fixed portion of a worksheet. More...
 
class  path
 Encapsulates a path that points to location in a filesystem. More...
 
class  pattern_fill
 Represents a fill which colors the cell based on a foreground and background color and a pattern. More...
 
class  phonetic_pr
 Phonetic properties Element provides a collection of properties that affect display of East Asian Languages [Serialised phoneticPr] More...
 
struct  phonetic_run
 Encapsulates a run of text that More...
 
struct  print_options
 
class  protection
 Describes the protection style of a particular cell. More...
 
class  range
 A range is a 2D collection of cells with defined extens that can be iterated upon. More...
 
class  range_iterator
 An iterator used by worksheet and range for traversing a 2D grid of cells by row/column then across that row/column. More...
 
class  range_reference
 A range_reference describes a rectangular area of a worksheet with positive width and height defined by a top-left and bottom-right corner. More...
 
class  relationship
 Represents an association between a source Package or part, and a target object which can be a part or external resource. More...
 
class  rgb_color
 An RGB color describes a color in terms of its red, green, blue, and alpha components. More...
 
class  rich_text
 Encapsulates zero or more formatted text runs where a text run is a string of text with the same defined formatting. More...
 
class  rich_text_hash
 
struct  rich_text_run
 Typedef a rich_text_run as a pair of string and optional font. More...
 
class  row_properties
 The properties of a row in a worksheet. More...
 
struct  scoped_enum_hash
 Allows a scoped enum (aka "enum class") to be used as a key in a std::unordered_map. More...
 
class  selection
 The selected area of a worksheet. More...
 
class  sheet_format_properties
 General worksheet formatting properties. More...
 
struct  sheet_pr
 
class  sheet_protection
 Protection applied to a particular worksheet to prevent it from being modified. More...
 
class  sheet_view
 Describes a view of a worksheet. Worksheets can have multiple views which show the data differently. More...
 
class  streaming_workbook_reader
 workbook is the container for all other parts of the document. More...
 
class  streaming_workbook_writer
 workbook is the container for all other parts of the document. More...
 
class  style
 Describes a style which has a name and can be applied to multiple individual formats. In Excel this is a "Cell Style". More...
 
class  theme
 A theme is a combination of fonts, colors, and effects. This isn't really supported yet. More...
 
class  theme_color
 A theme color encapsulates a color derived from the theme. More...
 
struct  time
 A time is a specific time of the day specified in terms of an hour, minute, second, and microsecond (0-999999). It can also be initialized as a fraction of a day using time::from_number. More...
 
struct  timedelta
 Represents a span of time between two datetimes. This is not fully supported yet throughout the library. More...
 
class  unhandled_switch_case
 Debug exception for a switch that fell through to the default case More...
 
class  unsupported
 Exception for attempting to use a feature which is not supported More...
 
class  uri
 Encapsulates a uniform resource identifier (URI) as described by RFC 3986. More...
 
class  variant
 Represents an object that can have variable type. More...
 
class  workbook
 workbook is the container for all other parts of the document. More...
 
class  workbook_view
 A workbook can be opened in multiple windows with different views. This class represents a particular view used by one window. More...
 
class  worksheet
 A worksheet is a 2D array of cells starting with cell A1 in the top-left corner and extending indefinitely down and right as needed. More...
 
class  worksheet_iterator
 An iterator which is used to iterate over the worksheets in a workbook. More...
 

Typedefs

using row_t = std::uint32_t
 All rows should be referred to by an instance of this type. More...
 

Enumerations

enum  cell_type {
  cell_type::empty, cell_type::boolean, cell_type::date, cell_type::error,
  cell_type::inline_string, cell_type::number, cell_type::shared_string, cell_type::formula_string
}
 Enumerates the possible types a cell can be determined by it's current value. More...
 
enum  row_or_col_t : int { row, column }
 
enum  target_mode { target_mode::internal, target_mode::external }
 Specifies whether the target of a relationship is inside or outside the Package. More...
 
enum  relationship_type {
  unknown, core_properties, extended_properties, custom_properties,
  office_document, thumbnail, printer_settings, calculation_chain,
  chartsheet, comments, connections, custom_property,
  custom_xml_mappings, dialogsheet, drawings, external_workbook_references,
  pivot_table, pivot_table_cache_definition, pivot_table_cache_records, query_table,
  shared_string_table, shared_workbook_revision_headers, shared_workbook, theme,
  revision_log, shared_workbook_user_data, single_cell_table_definitions, stylesheet,
  table_definition, vml_drawing, volatile_dependencies, worksheet,
  vbaproject, hyperlink, image
}
 All package relationships must be one of these defined types. More...
 
enum  horizontal_alignment {
  general, left, center, right,
  fill, justify, center_continuous, distributed
}
 Text can be aligned horizontally within a cell in these enumerated ways. More...
 
enum  vertical_alignment {
  top, center, bottom, justify,
  distributed
}
 Text can be aligned vertically within a cell in these enumerated ways. More...
 
enum  border_side {
  start, end, top, bottom,
  diagonal, vertical, horizontal
}
 Enumerates the sides of a cell to which a border style can be applied. More...
 
enum  border_style {
  none, dashdot, dashdotdot, dashed,
  dotted, double_, hair, medium,
  mediumdashdot, mediumdashdotdot, mediumdashed, slantdashdot,
  thick, thin
}
 Enumerates the pattern of the border lines on a particular side. More...
 
enum  diagonal_direction { neither, up, down, both }
 Cells can have borders that go from the top-left to bottom-right or from the top-right to bottom-left, or both, or neither. Used by style->border. More...
 
enum  color_type { indexed, theme, rgb }
 Some colors are references to colors rather than having a particular RGB value. More...
 
enum  pattern_fill_type {
  none, solid, mediumgray, darkgray,
  lightgray, darkhorizontal, darkvertical, darkdown,
  darkup, darkgrid, darktrellis, lighthorizontal,
  lightvertical, lightdown, lightup, lightgrid,
  lighttrellis, gray125, gray0625
}
 The pattern of pixels upon which the corresponding pattern fill will be displayed More...
 
enum  gradient_fill_type { linear, path }
 Enumerates the types of gradient fills More...
 
enum  fill_type { pattern, gradient }
 Enumerates the possible fill types More...
 
enum  calendar { windows_1900, mac_1904 }
 An enumeration of possible base dates. Dates in Excel are stored as days since this base date. More...
 
enum  core_property {
  category, content_status, created, creator,
  description, identifier, keywords, language,
  last_modified_by, last_printed, modified, revision,
  subject, title, version
}
 Every core property in a workbook must be one of these types. More...
 
enum  extended_property {
  application, app_version, characters, characters_with_spaces,
  company, dig_sig, doc_security, heading_pairs,
  hidden_slides, h_links, hyperlink_base, hyperlinks_changed,
  lines, links_up_to_date, manager, m_m_clips,
  notes, pages, paragraphs, presentation_format,
  scale_crop, shared_doc, slides, template_,
  titles_of_parts, total_time, words
}
 Every extended property in a workbook must be one of these types. More...
 
enum  major_order { column, row }
 Defines whether iterating a range returns columns or rows sequentially. More...
 
enum  orientation { default_orientation, portrait, landscape }
 The orientation of the worksheet when it is printed. More...
 
enum  page_break { none = 0, row = 1, column = 2 }
 The types of page breaks. More...
 
enum  paper_size {
  letter = 1, letter_small = 2, tabloid = 3, ledger = 4,
  legal = 5, statement = 6, executive = 7, a3 = 8,
  a4 = 9, a4_small = 10, a5 = 11
}
 The possible paper sizes for printing. More...
 
enum  sheet_state { visible, hidden, very_hidden }
 Defines how a worksheet appears in the workbook. A workbook must have at least one sheet which is visible at all times. More...
 
enum  pane_state { frozen, frozen_split, split }
 Enumeration of possible states of a pane More...
 
enum  pane_corner { top_left, top_right, bottom_left, bottom_right }
 Enumeration of the four quadrants of a worksheet More...
 
enum  sheet_view_type { normal, page_break_preview, page_layout }
 Enumeration of possible types of sheet views More...
 

Functions

bool operator== (std::nullptr_t, const cell &cell)
 Returns true if this cell is uninitialized. More...
 
bool operator== (const cell &cell, std::nullptr_t)
 Returns true if this cell is uninitialized. More...
 
std::ostream & operator<< (std::ostream &stream, const xlnt::cell &cell)
 Convenience function for writing cell to an ostream. Uses cell::to_string() internally. More...
 
template<>
std::string cell::value< std::string > () const
 
bool operator== (const ext_list::ext &lhs, const ext_list::ext &rhs)
 
bool operator== (const calculation_properties &lhs, const calculation_properties &rhs)
 
bool operator== (const workbook_view &lhs, const workbook_view &rhs)
 
bool operator== (const column_properties &lhs, const column_properties &rhs)
 
bool operator== (const print_options &lhs, const print_options &rhs)
 
bool operator== (const std::string &reference_string, const range_reference &ref)
 Returns true if the string representation of the range is equivalent to ref. More...
 
bool operator== (const char *reference_string, const range_reference &ref)
 Returns true if the string representation of the range is equivalent to ref. More...
 
bool operator!= (const std::string &reference_string, const range_reference &ref)
 Returns true if the string representation of the range is not equivalent to ref. More...
 
bool operator!= (const char *reference_string, const range_reference &ref)
 Returns true if the string representation of the range is not equivalent to ref. More...
 
bool operator== (const row_properties &lhs, const row_properties &rhs)
 
bool operator== (const sheet_format_properties &lhs, const sheet_format_properties &rhs)
 
bool operator== (const sheet_pr &lhs, const sheet_pr &rhs)
 

Detailed Description

Enumerates the possible types a cell can be determined by it's current value.

Typedef Documentation

◆ row_t

using xlnt::row_t = typedef std::uint32_t

All rows should be referred to by an instance of this type.

Enumeration Type Documentation

◆ border_side

enum xlnt::border_side
strong

Enumerates the sides of a cell to which a border style can be applied.

◆ border_style

enum xlnt::border_style
strong

Enumerates the pattern of the border lines on a particular side.

◆ calendar

enum xlnt::calendar
strong

An enumeration of possible base dates. Dates in Excel are stored as days since this base date.

◆ cell_type

enum xlnt::cell_type
strong

Enumerates the possible types a cell can be determined by it's current value.

Enumerator
empty 

no value

boolean 

value is TRUE or FALSE

date 

value is an ISO 8601 formatted date

error 

value is a known error code such as #VALUE!

inline_string 

value is a string stored in the cell

number 

value is a number

shared_string 

value is a string shared with other cells to save space

formula_string 

value is the string result of a formula

◆ color_type

enum xlnt::color_type
strong

Some colors are references to colors rather than having a particular RGB value.

◆ core_property

enum xlnt::core_property
strong

Every core property in a workbook must be one of these types.

◆ diagonal_direction

Cells can have borders that go from the top-left to bottom-right or from the top-right to bottom-left, or both, or neither. Used by style->border.

◆ extended_property

Every extended property in a workbook must be one of these types.

◆ fill_type

enum xlnt::fill_type
strong

Enumerates the possible fill types

◆ gradient_fill_type

Enumerates the types of gradient fills

◆ horizontal_alignment

Text can be aligned horizontally within a cell in these enumerated ways.

◆ major_order

enum xlnt::major_order
strong

Defines whether iterating a range returns columns or rows sequentially.

◆ orientation

enum xlnt::orientation
strong

The orientation of the worksheet when it is printed.

◆ page_break

enum xlnt::page_break
strong

The types of page breaks.

◆ pane_corner

enum xlnt::pane_corner
strong

Enumeration of the four quadrants of a worksheet

◆ pane_state

enum xlnt::pane_state
strong

Enumeration of possible states of a pane

◆ paper_size

enum xlnt::paper_size
strong

The possible paper sizes for printing.

◆ pattern_fill_type

The pattern of pixels upon which the corresponding pattern fill will be displayed

◆ relationship_type

All package relationships must be one of these defined types.

◆ sheet_state

enum xlnt::sheet_state
strong

Defines how a worksheet appears in the workbook. A workbook must have at least one sheet which is visible at all times.

◆ sheet_view_type

enum xlnt::sheet_view_type
strong

Enumeration of possible types of sheet views

◆ target_mode

enum xlnt::target_mode
strong

Specifies whether the target of a relationship is inside or outside the Package.

Enumerator
internal 

The relationship references a resource that is external to the package.

external 

The relationship references a part that is inside the package.

◆ vertical_alignment

Text can be aligned vertically within a cell in these enumerated ways.

Function Documentation

◆ operator!=() [1/2]

bool xlnt::operator!= ( const std::string &  reference_string,
const range_reference ref 
)

Returns true if the string representation of the range is not equivalent to ref.

◆ operator!=() [2/2]

bool xlnt::operator!= ( const char *  reference_string,
const range_reference ref 
)

Returns true if the string representation of the range is not equivalent to ref.

◆ operator<<()

std::ostream& xlnt::operator<< ( std::ostream &  stream,
const xlnt::cell cell 
)

Convenience function for writing cell to an ostream. Uses cell::to_string() internally.

◆ operator==() [1/4]

bool xlnt::operator== ( const std::string &  reference_string,
const range_reference ref 
)

Returns true if the string representation of the range is equivalent to ref.

◆ operator==() [2/4]

bool xlnt::operator== ( const char *  reference_string,
const range_reference ref 
)

Returns true if the string representation of the range is equivalent to ref.

◆ operator==() [3/4]

bool xlnt::operator== ( std::nullptr_t  ,
const cell cell 
)

Returns true if this cell is uninitialized.

◆ operator==() [4/4]

bool xlnt::operator== ( const cell cell,
std::nullptr_t   
)

Returns true if this cell is uninitialized.