pylightxl, Release 2019
• key (Union[str,int,float,bool]) – any cell value within keyindex row (type
sensitive)
• keyindex (int, optional) – option keyrow override. Must be >0 and smaller than
worksheet size, defaults to 1
Returns list of the entire matched key column data (only first match is returned)
Return type List[Union[str,int,float,bool]]
keyrow(key, keyindex=1)
Takes a row key value (value of any cell within keyindex col) and returns the entire row, no match returns
an empty list
Parameters
• key (Union[str,int,float,bool]) – any cell value within keyindex col (type
sensitive)
• keyindex (int, optional) – option keyrow override. Must be >0 and smaller than
worksheet size, defaults to 1
Returns list of the entire matched key row data (only first match is returned)
Return type List[Union[str,int,float,bool]]
range(address, formula=False, output=’v’)
Takes a range (ex: “A1:A2”) and returns a nested list [row][col]
Parameters
• address (str) – cell range (ex: “A1:A2”, or “A1”)
• formula (bool, optional) – returns the values if false, or formulas if true of cells,
defaults to False
• output (str, optional) – output request “v” for value, “f” for formula, “c” for
comment, defaults to ‘v’
Returns nested list [row][col] regardless if range is a single cell or a range
Return type _type_
row(row, formula=False, output=’v’)
Takes a row index input and returns a list of cell data
Parameters
• row (int) – row index (starting at 1)
• formula (bool, optional) – flag to return the formula of this cell, defaults to False
• output (str, optional) – output request “v” for value, “f” for formula, “c” for
comment, defaults to ‘v’
Returns list of cell data
Return type List[Union[int, float, str, bool]]
rows
Returns a list of rows that can be iterated through
Returns list of rows-lists (ex: [[11,12,13],[21,22,23]] for 2 rows with 3 columns of data
Return type Iterable[List[Union[int, float, str, bool]]]
2.3. Source Code Documentation 15