Bases: lpod.element.odf_element
Class for the table cell element.
Get the currency used for monetary values.
Get the formula of the cell, or None if undefined.
The formula is not interpreted in any way.
Return: unicode
Get the number of times the cell is repeated.
Always None when using the table API.
Return: int or None
Get the style of the cell itself.
Return: unicode
Get the type of the cell: boolean, float, date, string or time.
Return: str
Get the Python value that represent the cell.
Possible return types are unicode, int, Decimal, datetime, timedelta. If get_type is True, returns a tuple (value, ODF type of value)
Return: Python type or tuple (python type, string)
Set the currency used for monetary values.
Arguments:
currency – unicode
Set the formula of the cell, or None to remove it.
The formula is not interpreted in any way.
Arguments:
formula – unicode
Set the numnber of times the cell is repeated, or None to delete it.
Arguments:
repeated – int or None
Set the style of the cell itself.
Arguments:
style – unicode
Set the type ofthe cell manually.
Arguments:
cell_type – ‘boolean’, ‘float’, ‘date’, ‘string’ or ‘time’
Set the cell state from the Python value type.
Text is how the cell is displayed. Cell type is guessed, unless provided.
For monetary values, provide the name of the currency.
Arguments:
value – Python type
text – unicode
- cell_type – ‘boolean’, ‘float’, ‘date’, ‘string’, ‘time’,
- ‘currency’ or ‘percentage’
currency – unicode
Bases: lpod.element.odf_element
Get the number of times the column is repeated.
Always None when using the table API.
Return: int or None
Get the style of the column itself.
Return: unicode
Set the numnber of times the column is repeated, or None to delete it and update cache map.
Arguments:
repeated – int or None
Set the style of the column itself.
Arguments:
style – unicode
Bases: lpod.element.odf_element
ODF Named Range. Identifies inside the spreadsheet a range of cells of a table by a name and the name of the table.
Name Ranges have the following attributes:
name – name of the named range
table_name – name of the table
start – first cell of the named range, tuple (x, y)
end – last cell of the named range, tuple (x, y)
crange – range of the named range, tuple (x, y, z, t)
usage – None or str, usage of the named range.
Shortcut to retrieve the value of the first cell of the named range. See table.get_value() for the arguments description and return format.
Shortcut to retrieve the values of the cells of the named range. See table.get_values() for the arguments description and return format.
Set the name of the Named Range. The name is mandatory, if a Named Range of the same name exists, it will be replaced. Name must contains only alphanumerics characters and ‘_’, and can not be of a cell coordinates form like ‘AB12’.
Arguments:
name – str
Set the range of the named range. Range can be either one cell (like ‘A1’) or an area (‘A1:B2’). It can be provided as an alpha numeric value like “A1:B2’ or a tuple like (0, 0, 1, 1) or (0, 0).
Arguments:
crange – str or tuple of int, cell or area coordinate
Set the name of the table of the Named Range. The name is mandatory.
Arguments:
name – str
Set the usage of the Named Range. Usage can be None (default) or one of :
‘print-range’ ‘filter’ ‘repeat-column’ ‘repeat-row’
Arguments:
usage – None or str
Shortcut to set the value of the first cell of the named range. See table.set_value() for the arguments description.
Shortcut to set the values of the cells of the named range. See table.set_values() for the arguments description.
Bases: lpod.element.odf_element
Append the given cell at the end of the row. Repeated cells are accepted. If no cell is given, an empty one is created.
Do not use when working on a table, use odf_table.append_cell.
Arguments:
cell – odf_cell
_repeated – (optional), repeated value of the row
returns the cell with x and y updated
Append the given cell at the end of the row. Repeated cells are accepted. If no cell is given, an empty one is created.
Do not use when working on a table, use odf_table.append_cell.
Arguments:
cell – odf_cell
_repeated – (optional), repeated value of the row
returns the cell with x and y updated
Delete the cell at the given position “x” starting from 0. Alphabetical positions like “D” are accepted.
Cells on the right will be shifted to the left. In a table, other rows remain unaffected.
Arguments:
x – int or str
Get the cell at position “x” starting from 0. Alphabetical positions like “D” are accepted.
A copy is returned, use set_cell to push it back.
Arguments:
x – int or str
Return: odf_cell
Get the list of cells matching the criteria.
Filter by cell_type, with cell_type ‘all’ will retrieve cells of any type, aka non empty cells.
Filter by coordinates will retrieve the amount of cells defined by ‘coord’, minus the other filters.
Arguments:
coord – str or tuple of int : coordinates
- cell_type – ‘boolean’, ‘float’, ‘date’, ‘string’, ‘time’,
- ‘currency’, ‘percentage’ or ‘all’
content – regex, unicode
style – unicode
Return: list of tuples
Get the number of times the row is repeated.
Always None when using the table API.
Return: int or None
Get the style of the row itself.
Return: unicode
Shortcut to get the value of the cell at position “x”. If get_type is True, returns the tuples (value, ODF type).
If the cell is empty, returns None or (None, None)
See get_cell and odf_cell.get_value.
Shortcut to get the cell values in this row.
Filter by cell_type, with cell_type ‘all’ will retrieve cells of any type, aka non empty cells. If cell_type is used and complete is True, missing values are replaced by None. If cell_type is None, complete is always True : with no cell type queried, get_values() returns None for each empty cell, the length of the list is equal to the length of the row (depending on coordinates use).
If get_type is True, returns a tuple (value, ODF type of value), or (None, None) for empty cells if complete is True.
Filter by coordinates will retrieve the amount of cells defined by coordinates with None for empty cells, except when using cell_type.
Arguments:
coord – str or tuple of int : coordinates in row
- cell_type – ‘boolean’, ‘float’, ‘date’, ‘string’, ‘time’,
- ‘currency’, ‘percentage’ or ‘all’
complete – boolean
get_type – boolean
Return: list of Python types, or list of tuples.
Get the number of expected cells in the row, i.e. addition repetitions.
Return: int
Insert the given cell at position “x” starting from 0. If no cell is given, an empty one is created.
Alphabetical positions like “D” are accepted.
Do not use when working on a table, use odf_table.insert_cell.
Arguments:
x – int or str
cell – odf_cell
returns the cell with x and y updated
Return whether every cell in the row has no value or the value evaluates to False (empty string), and no style.
If aggressive is True, empty cells with style are considered empty.
Arguments:
aggressive – bool
Return: bool
Remove in-place empty cells at the right of the row. An empty cell has no value but can have style. If “aggressive” is True, style is ignored.
Arguments:
aggressive – bool
Push the cell back in the row at position “x” starting from 0. Alphabetical positions like “D” are accepted.
Arguments:
x – int or str
returns the cell with x and y updated
Set the cells in the row, from the ‘start’ column. This method does not clear the row, use row.clear() before to start with an empty row.
Arguments:
cells – list of cells
start – int or str
Set the numnber of times the row is repeated, or None to delete it and update cache map.
Arguments:
repeated – int or None
Set the style of the row itself.
Arguments:
style – unicode
Shortcut to set the value of the cell at position “x”.
Arguments:
x – int or str
value – Python type
- cell_type – ‘boolean’, ‘currency’, ‘date’, ‘float’, ‘percentage’,
- ‘string’ or ‘time’
currency – three-letter str
style – unicode
See get_cell and odf_cell.get_value.
Shortcut to set the value of cells in the row, from the ‘start’ column vith values. This method does not clear the row, use row.clear() before to start with an empty row.
Arguments:
values – list of Python types
start – int or str
- cell_type – ‘boolean’, ‘float’, ‘date’, ‘string’, ‘time’,
- ‘currency’ or ‘percentage’
currency – three-letter str
style – cell style
Yield as many cell elements as expected cells in the row, i.e. expand repetitions by returning the same cell as many times as necessary.
Arguments:
start – int
end – int
Copies are returned, use set_cell to push them back.
Bases: lpod.element.odf_element
Class to group rows with common properties.
Bases: lpod.element.odf_element
Dispatch .append() call to append_row() or append_column().
Append the given cell at the “y” coordinate. Repeated cells are accepted. If no cell is given, an empty one is created.
Position start at 0. So cell A4 is on row 3.
Other rows remain untouched.
Arguments:
y – int
cell – odf_cell
returns the cell with x and y updated
Append the column at the end of the table. If no column is given, an empty one is created.
ODF columns don’t contain cells, only style information.
Position start at 0. So cell C4 is on column 2. Alphabetical position like “C” is accepted.
Arguments:
column – odf_column
Append the row at the end of the table. If no row is given, an empty one is created.
Position start at 0. So cell A4 is on row 3.
Note the columns are automatically created when the first row is inserted in an empty table. So better insert a filled row.
Arguments:
row – odf_row
_repeated – (optional), repeated value of the row
returns the row, with updated row.y
Delete a Cell Span. ‘area’ is the cell coordiante of the upper left cell of the spanned area.
Area can be either one cell (like ‘A1’) or an area (‘A1:B2’). It can be provided as an alpha numeric value like “A1:B2’ or a tuple like (0, 0, 1, 1) or (0, 0). If an area is provided, the upper left cell is used.
Arguments:
area – str or tuple of int, cell or area coordinate
Delete the cell at the given coordinates, so that next cells are shifted to the left.
Coordinates are either a 2-uplet of (x, y) starting from 0, or a human-readable position like “C4”.
Use “set_value” for erasing value.
Arguments:
coord – (int, int) or str
Delete the column at the given position. ODF columns don’t contain cells, only style information.
Position start at 0. So cell C4 is on column 2. Alphabetical position like “C” is accepted.
Arguments:
x – int or str.isalpha()
Delete the Named Range of specified name from the spreadsheet. Beware : named ranges are stored at the body level, thus do not call this method on a cloned table.
Arguments:
name – str
Delete the row at the given “y” position.
Position start at 0. So cell A4 is on row 3.
Arguments:
y – int or str
Append a list of rows at the end of the table.
Arguments:
rows – list of odf_row
Get the cell at the given coordinates.
They are either a 2-uplet of (x, y) starting from 0, or a human-readable position like “C4”.
A copy is returned, use set_cell to push it back.
Arguments:
coord – (int, int) or str
Return: odf_cell
Get the cells matching the criteria. If ‘coord’ is None, parse the whole table, else parse the area defined by ‘coord’.
Filter by cell_type = “all” will retrieve cells of any type, aka non empty cells.
If flat is True (default is False), the method return a single list of all the values, else a list of lists of cells.
if cell_type, style and content are None, get_cells() will return the exact number of cells of the area, including empty cells.
Arguments:
coordinates – str or tuple of int : coordinates of area
- cell_type – ‘boolean’, ‘float’, ‘date’, ‘string’, ‘time’,
- ‘currency’, ‘percentage’ or ‘all’
content – regex, unicode
style – unicode
flat – boolean
Return: list of tuples
Get the column at the given “x” position.
ODF columns don’t contain cells, only style information.
Position start at 0. So cell C4 is on column 2. Alphabetical position like “C” is accepted.
A copy is returned, use set_column to push it back.
Arguments:
x – int or str.isalpha()
Return: odf_column
Get the list of cells at the given position.
Position start at 0. So cell C4 is on column 2. Alphabetical position like “C” is accepted.
Filter by cell_type, with cell_type ‘all’ will retrieve cells of any type, aka non empty cells.
If complete is True, replace missing values by None.
Arguments:
x – int or str.isalpha()
- cell_type – ‘boolean’, ‘float’, ‘date’, ‘string’, ‘time’,
- ‘currency’, ‘percentage’ or ‘all’
content – regex, unicode
style – unicode
complete – boolean
Return: list of odf_cell
Shortcut to get the list of Python values for the cells at the given position.
Position start at 0. So cell C4 is on column 2. Alphabetical position like “C” is accepted.
Filter by cell_type, with cell_type ‘all’ will retrieve cells of any type, aka non empty cells. If cell_type and complete is True, replace missing values by None.
If get_type is True, returns a tuple (value, ODF type of value)
Arguments:
x – int or str.isalpha()
- cell_type – ‘boolean’, ‘float’, ‘date’, ‘string’, ‘time’,
- ‘currency’, ‘percentage’ or ‘all’
complete – boolean
get_type – boolean
Return: list of Python types
Get the list of columns matching the criteria. Each result is a tuple of (x, column).
Arguments:
coord – str or tuple of int : coordinates of columns
style – unicode
Return: list of columns
Get the current height of the table.
Return: int
Return the name of the table.
Returns the Name Ranges of the specified name. If table_name is provided, limits the search to these tables. Beware : named ranges are stored at the body level, thus do not call this method on a cloned table.
Arguments:
name – str, name of the named range object
Return : odf_named_range
Returns the list of available Name Ranges of the spreadsheet. If table_name is provided, limits the search to these tables. Beware : named ranges are stored at the body level, thus do not call this method on a cloned table.
Arguments:
table_names – str or list of str, names of tables
Return : list of odf_table_range
Get the row at the given “y” position.
Position start at 0. So cell A4 is on row 3.
A copy is returned, use set_cell to push it back.
Arguments:
y – int or str
Return: odf_row
Shortcut to get the list of Python values for the cells of the row at the given “y” position.
Position start at 0. So cell A4 is on row 3.
Filter by cell_type, with cell_type ‘all’ will retrieve cells of any type, aka non empty cells. If cell_type and complete is True, replace missing values by None.
If get_type is True, returns a tuple (value, ODF type of value)
Arguments:
y – int, str
- cell_type – ‘boolean’, ‘float’, ‘date’, ‘string’, ‘time’,
- ‘currency’, ‘percentage’ or ‘all’
complete – boolean
get_type – boolean
Return: list of lists of Python types
Get the list of rows matching the criteria.
Filter by coordinates will parse the area defined by the coordinates.
Arguments:
coord – str or tuple of int : coordinates of rows
content – regex, unicode
style – unicode
Return: list of rows
Shortcut to get the current width and height of the table.
Return: (int, int)
Shortcut to get the Python value of the cell at the given coordinates.
If get_type is True, returns the tuples (value, ODF type)
coord is either a 2-uplet of (x, y) starting from 0, or a human-readable position like “C4”. If an Area is given, the upper left position is used as coord.
Arguments:
coord – (int, int) or str : coordinate
Return: Python type
Get a matrix of values of the table.
Filter by coordinates will parse the area defined by the coordinates.
If ‘cell_type’ is used and ‘complete’ is True (default), missing values are replaced by None. Filter by ‘ cell_type = “all” ‘ will retrieve cells of any type, aka non empty cells.
If ‘cell_type’ is None, complete is always True : with no cell type queried, get_values() returns None for each empty cell, the length each lists is equal to the width of the table.
If get_type is True, returns tuples (value, ODF type of value), or (None, None) for empty cells with complete True.
If flat is True, the methods return a single list of all the values. By default, flat is False.
Arguments:
coord – str or tuple of int : coordinates of area
- cell_type – ‘boolean’, ‘float’, ‘date’, ‘string’, ‘time’,
- ‘currency’, ‘percentage’ or ‘all’
complete – boolean
get_type – boolean
Return: list of lists of Python types
Get the current width of the table, measured on columns.
Rows may have different widths, use the odf_table API to ensure width consistency.
Return: int
Insert the given cell at the given coordinates. If no cell is given, an empty one is created.
Coordinates are either a 2-uplet of (x, y) starting from 0, or a human-readable position like “C4”.
Cells on the right are shifted. Other rows remain untouched.
Arguments:
coord – (int, int) or str
cell – odf_cell
returns the cell with x and y updated
Insert the column before the given “x” position. If no column is given, an empty one is created.
ODF columns don’t contain cells, only style information.
Position start at 0. So cell C4 is on column 2. Alphabetical position like “C” is accepted.
Arguments:
x – int or str.isalpha()
column – odf_column
Insert the row before the given “y” position. If no row is given, an empty one is created.
Position start at 0. So cell A4 is on row 3.
If row is None, a new empty row is created.
Arguments:
y – int or str
row – odf_row
returns the row, with updated row.y
Return wether every cell in the column at “x” position has no value or the value evaluates to False (empty string), and no style.
Position start at 0. So cell C4 is on column 2. Alphabetical position like “C” is accepted.
If aggressive is True, empty cells with style are considered empty.
Return: bool
Return whether every cell in the table has no value or the value evaluates to False (empty string), and no style.
If aggressive is True, empty cells with style are considered empty.
Arguments:
aggressive – bool
Return wether every cell in the row at the given “y” position has no value or the value evaluates to False (empty string), and no style.
Position start at 0. So cell A4 is on row 3.
If aggressive is True, empty cells with style are considered empty.
Arguments:
y – int or str
aggressive – bool
Iterate through lines of Python values of the table.
Filter by coordinates will parse the area defined by the coordinates.
cell_type, complete, grt_type : see get_values()
Arguments:
coord – str or tuple of int : coordinates of area
- cell_type – ‘boolean’, ‘float’, ‘date’, ‘string’, ‘time’,
- ‘currency’, ‘percentage’ or ‘all’
complete – boolean
get_type – boolean
Return: iterator of lists
Remove in-place empty rows below and empty cells at the right of the table. Cells are empty if they contain no value or it evaluates to False, and no style.
If aggressive is True, empty cells with style are removed too.
Argument:
aggressive – bool
Replace a cell of the table at the given coordinates.
They are either a 2-uplet of (x, y) starting from 0, or a human-readable position like “C4”.
Arguments:
coord – (int, int) or str : coordinate
cell – odf_cell
return the cell, with x and y updated
Do all the magic to display an image in the cell at the given coordinates.
They are either a 2-uplet of (x, y) starting from 0, or a human-readable position like “C4”.
The frame element must contain the expected image position and dimensions.
Image insertion depends on the document type, so the type must be provided or the table element must be already attached to a document.
Arguments:
coord – (int, int) or str
image_frame – odf_frame including an image
type – ‘spreadsheet’ or ‘text’
set the cells in the table, from the ‘coord’ position.
‘coord’ is the coordinate of the upper left cell to be modified by values. If ‘coord’ is None, default to the position (0,0) (“A1”). If ‘coord’ is an area (e.g. “A2:B5”), the upper left position of this area is used as coordinate.
The table is not cleared before the operation, to reset the table before setting cells, use table.clear().
A list of lists is expected, with as many lists as rows to be set, and as many cell in each sublist as cells to be setted in the row.
Arguments:
cells – cell object
coord – tuple or str
values – list of lists of python types
Replace the column at the given “x” position.
ODF columns don’t contain cells, only style information.
Position start at 0. So cell C4 is on column 2. Alphabetical position like “C” is accepted.
Arguments:
x – int or str.isalpha()
column – odf_column
Shortcut to set the list of cells at the given position.
Position start at 0. So cell C4 is on column 2. Alphabetical position like “C” is accepted.
The list must have the same length than the table height.
Arguments:
x – int or str.isalpha()
cells – list of odf_cell
Shortcut to set the list of Python values of cells at the given position.
Position start at 0. So cell C4 is on column 2. Alphabetical position like “C” is accepted.
The list must have the same length than the table height.
Arguments:
x – int or str.isalpha()
values – list of Python types
- cell_type – ‘boolean’, ‘currency’, ‘date’, ‘float’, ‘percentage’,
- ‘string’ or ‘time’
currency – three-letter str
style – unicode
Set the name of the table. Name can’t be empty and can’t have the character “’” or ‘/’.
Create a Named Range element and insert it in the document. Beware : named ranges are stored at the body level, thus do not call this method on a cloned table.
Arguments:
name – str, name of the named range
crange – str or tuple of int, cell or area coordinate
table_name – str, name of the table
uage – None or ‘print-range’, ‘filter’, ‘repeat-column’, ‘repeat-row’
Replace the row at the given position with the new one. Repetions of the old row will be adjusted.
If row is None, a new empty row is created.
Position start at 0. So cell A4 is on row 3.
Arguments:
y – int
row – odf_row
returns the row, with updated row.y
Shortcut to set all the cells of the row at the given “y” position.
Position start at 0. So cell A4 is on row 3.
Arguments:
y – int or str
cells – list of Python types
style – unicode
returns the row, with updated row.y
Shortcut to set the values of all cells of the row at the given “y” position.
Position start at 0. So cell A4 is on row 3.
Arguments:
y – int or str
values – list of Python types
- cell_type – ‘boolean’, ‘currency’, ‘date’, ‘float’, ‘percentage’,
- ‘string’ or ‘time’
currency – three-letter str
style – unicode
returns the row, with updated row.y
Create a Cell Span : span the first cell of the area on several columns and/or rows. If merge is True, replace text of the cell by the concatenation of existing text in covered cells. Beware : if merge is True, old text is changed, if merge is False (the default), old text in coverd cells is still present but not displayed by most GUI.
If the area defines only one cell, the set span will do nothing. It is not allowed to apply set span to an area whose one cell already belongs to previous cell span.
Area can be either one cell (like ‘A1’) or an area (‘A1:B2’). It can be provided as an alpha numeric value like “A1:B2’ or a tuple like (0, 0, 1, 1) or (0, 0).
Arguments:
area – str or tuple of int, cell or area coordinate
merge – boolean
Set the Python value of the cell at the given coordinates.
They are either a 2-uplet of (x, y) starting from 0, or a human-readable position like “C4”.
Arguments:
coord – (int, int) or str
value – Python type
- cell_type – ‘boolean’, ‘currency’, ‘date’, ‘float’, ‘percentage’,
- ‘string’ or ‘time’
currency – three-letter str
style – unicode
set the value of cells in the table, from the ‘coord’ position with values.
‘coord’ is the coordinate of the upper left cell to be modified by values. If ‘coord’ is None, default to the position (0,0) (“A1”). If ‘coord’ is an area (e.g. “A2:B5”), the upper left position of this area is used as coordinate.
The table is not cleared before the operation, to reset the table before setting values, use table.clear().
A list of lists is expected, with as many lists as rows, and as many items in each sublist as cells to be setted. None values in the list will create empty cells with no cell type (but eventually a style).
Arguments:
coord – tuple or str
values – list of lists of python types
- cell_type – ‘boolean’, ‘currency’, ‘date’, ‘float’, ‘percentage’,
- ‘string’ or ‘time’
currency – three-letter str
style – unicode
Write the table as CSV in the file. If the file is a string, it is opened as a local path. Else a open file-like is expected; it will not be closed afterwards.
Arguments:
path_or_file – str or file-like
delimiter – str
quotechar – str
lineterminator – str
encoding – str
Swap in-place rows and columns of the table.
If ‘coord’ is not None, apply transpose only to the area defined by the coordinates. Beware, if area is not square, some cells mays be over written during the process.
Arguments:
coord – str or tuple of int : coordinates of area
start – int or str
Yield as many row elements as expected rows in the table, i.e. expand repetitions by returning the same row as many times as necessary.
Arguments:
start – int
end – int
Copies are returned, use set_row to push them back.
Yield as many column elements as expected columns in the table, i.e. expand repetitions by returning the same column as many times as necessary.
Arguments:
start – int
end – int
Copies are returned, use set_column to push them back.
Convert the CSV file to an odf_table. If the file is a string, it is opened as a local path. Else a open file-like is expected; it will not be closed afterwards.
CSV format can be autodetected to a certain limit, but encoding is important.
Arguments:
path_or_file – str or file-like
name – unicode
style – str
delimiter – str
quotechar – str
lineterminator – str
encoding – str
Create a cell element containing the given value. The textual representation is automatically formatted but can be provided. Cell type can be deduced as well, unless the number is a percentage or currency. If cell type is “currency”, the currency must be given. The cell can be repeated on the given number of columns.
Arguments:
- value – bool, int, float, Decimal, date, datetime, str, unicode,
- timedelta
text – unicode
- cell_type – ‘boolean’, ‘currency’, ‘date’, ‘float’, ‘percentage’,
- ‘string’ or ‘time’
currency – three-letter str
repeated – int
style – unicode
Return: odf_cell
Create a column group element of the optionally given style. Cell style can be set for the whole column. If the properties apply to several columns, give the number of repeated columns.
Columns don’t contain cells, just style information.
You don’t generally have to create columns by hand, use the odf_table API.
Arguments:
default_cell_style – unicode
repeated – int
style – unicode
Return: odf_column
Create a Named Range element. ‘name’ must contains only letters, digits and ‘_’, and must not be like a coordinate as ‘A1’. ‘table_name’ must be a correct table name (no “’” or “/” in it).
Arguments:
name – str, name of the named range
crange – str or tuple of int, cell or area coordinate
table_name – str, name of the table
uage – None or ‘print-range’, ‘filter’, ‘repeat-column’, ‘repeat-row’
Create a row element, optionally filled with “width” number of cells.
Rows contain cells, their number determine the number of columns.
You don’t generally have to create rows by hand, use the odf_table API.
Arguments:
width – int
repeated – int
style – unicode
Return: odf_row
Create a group of rows, optionnaly filled with “height” number of rows, of “width” cells each.
Row group bear style information applied to a series of rows.
Arguments:
height – int
Return odf_row_group
Create a table element, optionally prefilled with “height” rows of “width” cells each.
If the table is to be protected, a protection key must be provided, i.e. a hash value of the password (XXX what algorithm?).
If the table must not be displayed, set “display” to False.
If the table must not be printed, set “printable” to False. The table will not be printed when it is not displayed, whatever the value of this argument.
Ranges of cells to print can be provided as a list of cell ranges, e.g. [‘E6:K12’, ‘P6:R12’] or directly as a raw string, e.g. “E6:K12 P6:R12”.
You can access and modify the XML tree manually, but you probably want to use the API to access and alter cells. It will save you from handling repetitions and the same number of cells for each row.
If you use both the table API and the XML API, you are on your own for ensuiring model integrity.
Arguments:
name – unicode
width – int
height – int
protected – bool
protection_key – str
display – bool
printable – bool
print_ranges – list
style – unicode
Return: odf_table