Tables

createTable

createTable(x, y, width, height, numRows, numColumns, ["name"]) -> string

Creates a new table with the given number of rows and columns on the actual page and returns its name. The coordinates are given in the actual measurement unit of the document (see UNIT constants). "name" should be a unique identifier for the object because you need this name for further referencing of that object. If "name" is not given Scribus will create one for you.

May raise NameExistsError if you explicitly pass a name that's already used. May raise ValueError if an insufficient number of rows or columns is passed.

getCellColumnSpan

getCellColumnSpan(row, column, ["name"]) -> int

Returns the column span of the cell at "row", "column" in the table "name" or -1 if the cell does not exist. If the cell is covered by another spanning cell, the column span of the spanning cell is returned. If "name" is not given the currently selected item is used.

getCellFillColor

getCellFillColor(row, column, ["name"]) -> string

Returns the fill color of the cell at "row", "column" in the table "name" If "name" is not given the currently selected item is used.

getCellRowSpan

getCellRowSpan(row, column, ["name"]) -> int

Returns the row span of the cell at "row", "column" in the table "name" or -1 if the cell does not exist. If the cell is covered by another spanning cell, the row span of the spanning cell is returned. If "name" is not given the currently selected item is used.

getTableColumnWidth

getTableColumnWidth(column, ["name"]) -> float

Returns the column width of "column" in the table "name" expressed in points, or 0.0 if the column does not exist. If "name" is not given the currently selected item is used.

getTableColumns

getTableColumns(["name"]) -> integer

Gets the number of columns in the table "name". If "name" is not given the currently selected item is used.

getTableFillColor

getTableFillColor(["name"]) -> string

Returns the fill color of the table "name". If "name" is not given the currently selected item is used.

getTableRowHeight

getTableRowHeight(row, ["name"]) -> float

Returns the row height of "row" in the table "name" expressed in points, or 0.0 if the row does not exist. If "name" is not given the currently selected item is used.

getTableRows

getTableRows(["name"]) -> integer

Gets the number of rows in the table "name". If "name" is not given the currently selected item is used.

insertTableColumns

insertTableColumns(index, numColumns, ["name"])

Inserts "numColumns" columns before the column at "index" in the table "name". If "name" is not given the currently selected item is used.

May throw ValueError if number of columns is not at least one or index is out of bounds.

insertTableRows

insertTableRows(index, numRows, ["name"])

Inserts "numRows" rows before the row at "index" in the table "name". If "name" is not given the currently selected item is used.

May throw ValueError if number of rows is not at least one or index is out of bounds.

mergeTableCells

mergeTableCells(row, column, numRows, numColumns, ["name"])

Merges the cell at the specified "row" and "column" with the adjacent cells into one cell.

May throw ValueError if number if numRows or numColumns is less than 1 or the specified area is out of bounds.

removeTableColumns

removeTableColumns(index, numColumns, ["name"])

Removes "numColumns" columns from the table "name" starting with the column at "index". If "name" is not given the currently selected item is used.

May throw ValueError if number of columns is not at least one or the range to be deleted is out of bounds.

removeTableRows

removeTableRows(index, numRows, ["name"])

Removes "numRows" rows from the table "name" starting with the row at "index". If "name" is not given the currently selected item is used.

May throw ValueError if number of rows is not at least one or the range to be deleted is out of bounds.

resizeTableColumn

resizeTableColumn(column, width, ["name"])

Resizes "column" to "width" in the table "name". If "name" is not given the currently selected item is used.

May throw ValueError if the width is less than 0 or the column does not exist.

resizeTableRow

resizeTableRow(row, height, ["name"])

Resizes "row" to "height" in the table "name". If "name" is not given the currently selected item is used.

May throw ValueError if the height is less than 0 or the row does not exist.

setCellBottomBorder

setCellBottomBorder(row, column, borderLines, ["name"])

Sets the bottom border of the cell at "row", "column" in the table "name". The border is specified as a list of "(width, style, color)" tuples. "style" is one of the LINE_* constants. If "name" is not given the currently selected item is used.

May throw ValueError the cell does not exist or if "borderLines" is of the wrong format.

setCellBottomPadding

setCellBottomPadding(row, column, padding, ["name"])

Sets the bottom padding of the cell at "row", "column" in the table "name" to "padding". If "name" is not given the currently selected item is used.

May throw ValueError the cell does not exist or if "padding" is less than 0.

setCellFillColor

setCellFillColor(row, column, color, ["name"])

Sets the fill color of the cell at "row", "column" in the table "name" to "color". If "name" is not given the currently selected item is used.

May throw ValueError the cell does not exist.

setCellLeftBorder

setCellLeftBorder(row, column, borderLines, ["name"])

Sets the left border of the cell at "row", "column" in the table "name". The border is specified as a list of "(width, style, color)" tuples. "style" is one of the LINE_* constants. If "name" is not given the currently selected item is used.

May throw ValueError the cell does not exist or if "borderLines" is of the wrong format.

setCellLeftPadding

setCellLeftPadding(row, column, padding, ["name"])

Sets the left padding of the cell at "row", "column" in the table "name" to "padding". If "name" is not given the currently selected item is used.

May throw ValueError the cell does not exist or if "padding" less than 0.

setCellRightBorder

setCellRightBorder(row, column, borderLines, ["name"])

Sets the right border of the cell at "row", "column" in the table "name". The border is specified as a list of "(width, style, color)" tuples. "style" is one of the LINE_* constants. If "name" is not given the currently selected item is used.

May throw ValueError the cell does not exist or if "borderLines" is of the wrong format.

setCellRightPadding

setCellRightPadding(row, column, padding, ["name"])

Sets the right padding of the cell at "row", "column" in the table "name" to "padding". If "name" is not given the currently selected item is used.

May throw ValueError the cell does not exist or if "padding" less than 0.

setCellTopBorder

setCellTopBorder(row, column, borderLines, ["name"])

Sets the top border of the cell at "row", "column" in the table "name". The border is specified as a list of "(width, style, color)" tuples. "style" is one of the LINE_* constants. If "name" is not given the currently selected item is used.

May throw ValueError the cell does not exist or if "borderLines" is of the wrong format.

setCellTopPadding

setCellTopPadding(row, column, padding, ["name"])

Sets the top padding of the cell at "row", "column" in the table "name" to "padding". If "name" is not given the currently selected item is used.

May throw ValueError the cell does not exist or if "padding" is less than 0.

setTableBottomBorder

setTableBottomBorder(borderLines, ["name"])

Sets the bottom border of the table "name". The border is specified as a list of "(width, style, color)" tuples. "style" is one of the LINE_* constants. If "name" is not given the currently selected item is used.

May throw ValueError if "borderLines" is of the wrong format.

setTableFillColor

setTableFillColor(color, ["name"])

Sets the fill color of the table "name" to "color". If "name" is not given the currently selected item is used.

May throw ValueError the table does not exist.

setTableLeftBorder

setTableLeftBorder(borderLines, ["name"])

Sets the left border of the table "name". The border is specified as a list of "(width, style, color)" tuples. "style" is one of the LINE_* constants. If "name" is not given the currently selected item is used.

May throw ValueError if "borderLines" is of the wrong format.

setTableRightBorder

setTableRightBorder(borderLines, ["name"])

Sets the right border of the table "name". The border is specified as a list of "(width, style, color)" tuples. "style" is one of the LINE_* constants. If "name" is not given the currently selected item is used.

May throw ValueError if "borderLines" is of the wrong format.

setTableTopBorder

setTableTopBorder(borderLines, ["name"])

Sets the top border of the table "name". The border is specified as a list of "(width, style, color)" tuples. "style" is one of the LINE_* constants. If "name" is not given the currently selected item is used.

May throw ValueError if "borderLines" is of the wrong format.