Orcus
Loading...
Searching...
No Matches
orcus::spreadsheet::iface::import_sheet Class Referenceabstract

#include <import_interface.hpp>

Public Member Functions

virtual import_sheet_viewget_sheet_view ()
 
virtual import_sheet_propertiesget_sheet_properties ()
 
virtual import_data_tableget_data_table ()
 
virtual import_auto_filterget_auto_filter ()
 
virtual import_tableget_table ()
 
virtual import_conditional_formatget_conditional_format ()
 
virtual import_named_expressionget_named_expression ()
 
virtual import_array_formulaget_array_formula ()
 
virtual import_formulaget_formula ()
 
virtual void set_auto (row_t row, col_t col, std::string_view s)=0
 
virtual void set_string (row_t row, col_t col, string_id_t sindex)=0
 
virtual void set_value (row_t row, col_t col, double value)=0
 
virtual void set_bool (row_t row, col_t col, bool value)=0
 
virtual void set_date_time (row_t row, col_t col, int year, int month, int day, int hour, int minute, double second)=0
 
virtual void set_format (row_t row, col_t col, size_t xf_index)=0
 
virtual void set_format (row_t row_start, col_t col_start, row_t row_end, col_t col_end, size_t xf_index)=0
 
virtual void set_column_format (col_t col, col_t col_span, std::size_t xf_index)=0
 
virtual void set_row_format (row_t row, std::size_t xf_index)=0
 
virtual void fill_down_cells (row_t src_row, col_t src_col, row_t range_size)=0
 
virtual range_size_t get_sheet_size () const =0
 

Detailed Description

Interface for importing the content and properties of a sheet.

Member Function Documentation

◆ fill_down_cells()

virtual void orcus::spreadsheet::iface::import_sheet::fill_down_cells ( row_t src_row,
col_t src_col,
row_t range_size )
pure virtual

Duplicate the value of the source cell to one or more cells located immediately below it.

Parameters
src_rowrow ID of the source cell
src_colcolumn ID of the source cell
range_sizenumber of cells below the source cell to copy the source cell value to. It must be at least one.

◆ get_array_formula()

virtual import_array_formula * orcus::spreadsheet::iface::import_sheet::get_array_formula ( )
virtual

Get an optional interface for importing array formulas. An array formula is a formula expression applied to a range of cells where each cell may have a different result value.

Returns
pointer to the array formula import interface, or a nullptr if the implementor doesn't support it.

◆ get_auto_filter()

virtual import_auto_filter * orcus::spreadsheet::iface::import_sheet::get_auto_filter ( )
virtual

Get an optional interface for importing auto filter ranges.

The implementor should initialize the internal state of the temporary auto filter object when this method is called.

Returns
pointer to the auto filter interface object, or a nullptr if the implementor doesn't support it.

◆ get_conditional_format()

virtual import_conditional_format * orcus::spreadsheet::iface::import_sheet::get_conditional_format ( )
virtual

Get an optional interface for importing conditional formats.

Returns
pointer to the conditional format interface object, or nullptr if the implementer doesn't support importing conditional formats.

◆ get_data_table()

virtual import_data_table * orcus::spreadsheet::iface::import_sheet::get_data_table ( )
virtual

Get an optional interface for importing data tables. Note that the implementer may decide not to support this feature in which case this method should return a nullptr.

The implementor should initialize the internal state of the temporary data table object when this method is called.

Returns
pointer to the data table interface object, or a nullptr if the implementor doesn't support it.

◆ get_formula()

virtual import_formula * orcus::spreadsheet::iface::import_sheet::get_formula ( )
virtual

Get an optional interface for importing formula cells.

Returns
pointer to the formula interface object, or a nullptr if the implementer doesn't support importing of formula cells.

◆ get_named_expression()

virtual import_named_expression * orcus::spreadsheet::iface::import_sheet::get_named_expression ( )
virtual

Get an optional interface for importing sheet-local named expressions.

Returns
pointer to the sheet-local named expression interface, or a nullptr if the implementor doesn't support it.

◆ get_sheet_properties()

virtual import_sheet_properties * orcus::spreadsheet::iface::import_sheet::get_sheet_properties ( )
virtual

Get an optional interface for importing sheet properties.

Returns
pointer to the interface for importing sheet properties, or a nullptr if the implementor doesn't support it.

◆ get_sheet_size()

virtual range_size_t orcus::spreadsheet::iface::import_sheet::get_sheet_size ( ) const
pure virtual

Get the size of the sheet.

Returns
structure containing the numbers of rows and columns of the sheet.

◆ get_sheet_view()

virtual import_sheet_view * orcus::spreadsheet::iface::import_sheet::get_sheet_view ( )
virtual

Get an optional interface for importing properties that are specific to a view of a sheet.

Returns
pointer to the interface for importing view properties, or a nullptr if the implementor doesn't support it.

◆ get_table()

virtual import_table * orcus::spreadsheet::iface::import_sheet::get_table ( )
virtual

Get an interface for importing tables.

The implementor should initialize the internal state of the temporary table object when this method is called.

Returns
pointer to the table interface object, or nullptr if the implementer doesn't support importing of tables.

◆ set_auto()

virtual void orcus::spreadsheet::iface::import_sheet::set_auto ( row_t row,
col_t col,
std::string_view s )
pure virtual

Set raw string value to a cell and have the implementation auto-recognize its data type.

Parameters
rowrow ID
colcolumn ID
sraw string value.

◆ set_bool()

virtual void orcus::spreadsheet::iface::import_sheet::set_bool ( row_t row,
col_t col,
bool value )
pure virtual

Set a boolean value to a cell.

Parameters
rowrow ID
colcol ID
valueboolean value being assigned to the cell

◆ set_column_format()

virtual void orcus::spreadsheet::iface::import_sheet::set_column_format ( col_t col,
col_t col_span,
std::size_t xf_index )
pure virtual

Set cell format to a specified column. The cell format is referred to by the xf (cell format) index in the styles table.

Note
This method gets called first before set_row_format() or set_format() variants.
Parameters
colcolumn ID
col_spannumber of contiguous columns to apply the format to. It must be at least one.
xf_index0-based xf (cell format) index

◆ set_date_time()

virtual void orcus::spreadsheet::iface::import_sheet::set_date_time ( row_t row,
col_t col,
int year,
int month,
int day,
int hour,
int minute,
double second )
pure virtual

Set date and time value to a cell.

Parameters
rowrow ID
colcolumn ID
year1-based value representing year
month1-based value representing month, varying from 1 through 12.
day1-based value representing day, varying from 1 through 31.
hourthe hour of a day, ranging from 0 through 23.
minutethe minute of an hour, ranging from 0 through 59.
secondthe second of a minute, ranging from 0 through 59.

◆ set_format() [1/2]

virtual void orcus::spreadsheet::iface::import_sheet::set_format ( row_t row,
col_t col,
size_t xf_index )
pure virtual

Set cell format to specified cell. The cell format is referred to by the xf (cell format) index in the styles table.

Note
This method gets called after both set_column_format() and set_row_format().
Parameters
rowrow ID
colcolumn ID
xf_index0-based xf (cell format) index

◆ set_format() [2/2]

virtual void orcus::spreadsheet::iface::import_sheet::set_format ( row_t row_start,
col_t col_start,
row_t row_end,
col_t col_end,
size_t xf_index )
pure virtual

Set cell format to specified cell range. The cell format is referred to by the xf (cell format) index in the styles table.

Parameters
row_startstart row ID
col_startstart column ID
row_endend row ID
col_endend column ID
xf_index0-based xf (cell format) index

◆ set_row_format()

virtual void orcus::spreadsheet::iface::import_sheet::set_row_format ( row_t row,
std::size_t xf_index )
pure virtual

Set cell format to a specified row. The cell format is referred to by the xf (cell format) index in the styles table.

Note
This method gets called after set_column_format() but before set_format().
Parameters
rowrow ID
xf_index0-based xf (cell format) index

◆ set_string()

virtual void orcus::spreadsheet::iface::import_sheet::set_string ( row_t row,
col_t col,
string_id_t sindex )
pure virtual

Set string value to a cell.

Parameters
rowrow ID
colcolumn ID
sindex0-based string index in the shared string table.

◆ set_value()

virtual void orcus::spreadsheet::iface::import_sheet::set_value ( row_t row,
col_t col,
double value )
pure virtual

Set numerical value to a cell.

Parameters
rowrow ID
colcolumn ID
valuevalue being assigned to the cell.