UserSpace.new_space_from_excel#

UserSpace.new_space_from_excel(book, range_, sheet=None, name=None, names_row=0, param_cols=(0,), space_param_order=None, cells_param_order=None, transpose=False, names_col=None, param_rows=None)#

Create a child space from an Excel range.

Warning

This method is deprecated.

To use this method, openpyxl package must be installed.

Parameters:
  • book (str) – Path to an Excel file.

  • range (str) – Range expression, such as “A1”, “$G4:$K10”, or named range “NamedRange1”.

  • sheet (str) – Sheet name (case ignored).

  • name (str, optional) – Name of the space. Defaults to SpaceN, where N is a number determined automatically.

  • names_row (optional) – an index number indicating what row contains the names of cells and parameters. Defaults to the top row (0).

  • param_cols (optional) – a sequence of index numbers indicating parameter columns. Defaults to only the leftmost column ([0]).

  • names_col (optional) – an index number, starting from 0, indicating what column contains additional parameters.

  • param_rows (optional) – a sequence of index numbers, starting from 0, indicating rows of additional parameters, in case cells are defined in two dimensions.

  • transpose (optional) – Defaults to False. If set to True, “row(s)” and “col(s)” in the parameter names are interpreted inversely, i.e. all indexes passed to “row(s)” parameters are interpreted as column indexes, and all indexes passed to “col(s)” parameters as row indexes.

  • space_param_order – a sequence to specify space parameters and their orders. The elements of the sequence denote the indexes of param_cols elements, and optionally the index of param_rows elements shifted by the length of param_cols. The elements of this parameter and cell_param_order must not overlap.

  • cell_param_order (optional) – a sequence to reorder the parameters. The elements of the sequence denote the indexes of param_cols elements, and optionally the index of param_rows elements shifted by the length of param_cols. The elements of this parameter and cell_space_order must not overlap.

Returns:

The new child space created from the Excel range.

See also

new_cells_from_excel(): Create Cells from Excel file.

Changed in version 0.20.0: this method is deprecated.