Sheet
- class ixion.Sheet
Class
Sheet
represents a single sheet that stores cells in a 2-dimensional grid address space. Rows and columns are used to specify a position in the grid, and both rows and columns are 0-based, with the top-left-most cell having the address of row 0 and column 0.
- Sheet.name
A string representing the name of the sheet object. This is a read-only attribute.
- Sheet.set_numeric_cell(row, column, value)
Set a numeric value to a cell at specified row and column position.
- Parameters:
row (int) – row position.
column (int) – column position.
value (float) – numeric value to set to the specified position.
- Sheet.set_string_cell(row, column, value)
Set a string value to a cell at specified row and column position.
- Parameters:
row (int) – row position.
column (int) – column position.
value (str) – string value to set to the specified position.
- Sheet.set_formula_cell(row, column, value)
Set a formula expression (value) to a cell at specified row and column position.
- Parameters:
row (int) – row position.
column (int) – column position.
value (str) – formula expression to set to the specified position.
- Sheet.get_numeric_value(row, column)
Get a numeric value representing the content of a cell at specified row and column position. If the cell is of numeric type, its value is returned. If it’s a formula cell, the result of the calculated formula result is returned if the result is of numeric type.
- Parameters:
row (int) – row position.
column (int) – column position.
- Return type:
float
- Returns:
numeric value of the cell at specified position.
- Sheet.get_string_value(row, column)
Get a string value representing the content of a cell at specified row and column position. If the cell is of string type, its value is returned as-is. If it’s a formula cell, the result of the calculated formula result is returned if the result is of string type.
- Parameters:
row (int) – row position.
column (int) – column position.
- Return type:
str
- Returns:
string value of the cell at specified position.
- Sheet.get_formula_expression(row, column)
Given a formula cell at specified row and column position, get the formula expression stored in that cell.
- Parameters:
row (int) – row position.
column (int) – column position.
- Return type:
str
- Returns:
formula expression stored in the cell at specified position.
- Sheet.erase_cell(row, column)
Erase the cell at specified row and column position. The slot at the specified position becomes empty afterward.
- Parameters:
row (int) – row position.
column (int) – column position.