Excel functions
get_cell_from_sheet_index
get_cell_from_sheet_index(record, sheet_index, row_index, col_index)
Returns the dict representation of a cell from an Excel sheet referenced by sheet index
Args:
record (IBOCRRecord): original IBOCRRecord passed in using INPUT_IBOCR_RECORD
sheet_index (int): index of the desired sheet in the record
row_index (int): row index of the cell in the sheet
col_index (int): column index of the cell in the sheet
Returns:
Returns a dictionary representation of the cell in the format {’type’: <cell_type>, ‘value’: <value>}.
Examples:
get_cell_from_sheet_index(INPUT_IBOCR_RECORD, 0, 2, 3)
\-> {'type': 'cell\_text', 'value': 'hello'}
get_cell_from_sheet_name
get_cell_from_sheet_name(record, sheet_name, row_index, col_index)
Returns the dict representation of a cell from an Excel sheet referenced by sheet name
Args:
record (IBOCRRecord): original IBOCRRecord passed in using INPUT_IBOCR_RECORD
sheet_name (str): name of the desired sheet in the record
row_index (int): row index of the cell in the sheet
col_index (int): column index of the cell in the sheet
Returns:
Returns a dictionary representation of the cell in the format {’type’: <cell_type>, ‘value’: <value>}.
Examples:
get_cell_from_sheet_name(INPUT_IBOCR_RECORD, ‘sheet name 1’, 2, 3)
\-> {'type': 'cell\_text', 'value': 'hello'}
get_columns_from_sheet_index
get_columns_from_sheet_index(record, sheet_index, col_indices=None)
Returns the dict representation of columns from an Excel sheet referenced by sheet index
Args:
record (IBOCRRecord): original IBOCRRecord passed in using INPUT_IBOCR_RECORD
sheet_index (int): index of the desired sheet in the record
col_indices (List<int>): list of columns to be retrieved; if None, all columns are returned
Returns:
Returns the columns from the sheet as a list of list of cells, where each cell is a dictionary representation of the cell in the format {’type’: <cell_type>, ‘value’: <value>}.
Examples:
get_columns_from_sheet_index(INPUT_IBOCR_RECORD, 0, col_indices=[0,1,2])
\-> \[\[{'type': 'cell\_text', 'value': 'hello'}, {'type': 'cell\_number', 'value': 1.0}\],
\[{'type': 'cell\_date', 'value': 48350.0}, {'type': 'cell\_blank', 'value': ''}\],
\[{'type': 'cell\_boolean', 'value': 1}, {'type': 'cell\_text', 'value': 'world'}\]\]
get_columns_from_sheet_name
get_columns_from_sheet_name(record, sheet_name, col_indices=None)
Returns the dict representation of columns from an Excel sheet referenced by sheet name
Args:
record (IBOCRRecord): original IBOCRRecord passed in using INPUT_IBOCR_RECORD
sheet_name (str): name of the desired sheet in the record
col_indices (List<int>): list of columns to be retrieved; if None, all columns are returned
Returns:
Returns the columns from the sheet as a list of list of cells, where each cell is a dictionary representation of the cell in the format {’type’: <cell_type>, ‘value’: <value>}.
Examples:
get_columns_from_sheet_name(INPUT_IBOCR_RECORD, ‘sheet name 1’, col_indices=[0,1,2])
\-> \[\[{'type': 'cell\_text', 'value': 'hello'}, {'type': 'cell\_number', 'value': 1.0}\],
\[{'type': 'cell\_date', 'value': 48350.0}, {'type': 'cell\_blank', 'value': ''}\],
\[{'type': 'cell\_boolean', 'value': 1}, {'type': 'cell\_text', 'value': 'world'}\]\]
get_formatted_cell_from_sheet_index
get_formatted_cell_from_sheet_index(record, sheet_index, row_index, col_index)
Returns the string representation of a cell from an Excel sheet referenced by sheet index
Args:
record (IBOCRRecord): original IBOCRRecord passed in using INPUT_IBOCR_RECORD
sheet_index (int): index of the desired sheet in the record
row_index (int): row index of the cell in the sheet
col_index (int): column index of the cell in the sheet
Returns:
Returns a string representation of the cell.
Examples:
get_formatted_cell_from_sheet_index(INPUT_IBOCR_RECORD, 0, 2, 3)
\-> 'hello'
get_formatted_cell_from_sheet_name
get_formatted_cell_from_sheet_name(record, sheet_name, row_index, col_index)
Returns the string representation of a cell from an Excel sheet referenced by sheet name
Args:
record (IBOCRRecord): original IBOCRRecord passed in using INPUT_IBOCR_RECORD
sheet_name (str): name of the desired sheet in the record
row_index (int): row index of the cell in the sheet
col_index (int): column index of the cell in the sheet
Returns:
Returns a string representation of the cell.
Examples:
get_formatted_cell_from_sheet_name(INPUT_IBOCR_RECORD, ‘sheet name 1’, 2, 3)
\-> 'hello'
get_formatted_columns_from_sheet_index
get_formatted_columns_from_sheet_index(record, sheet_index, col_indices=None)
Returns the string representation of columns from an Excel sheet referenced by sheet index
Args:
record (IBOCRRecord): original IBOCRRecord passed in using INPUT_IBOCR_RECORD
sheet_index (int): index of the desired sheet in the record
col_indices (List<int>): list of columns to be retrieved; if None, all columns are returned
Returns:
Returns the columns from the sheet as a list of list of cells, where each cell is a string representation of the cell.
Examples:
get_formatted_columns_from_sheet_index(INPUT_IBOCR_RECORD, 0, col_indices=[0,1,2])
\-> \[\['hello', '1.0'\],
\['2020-01-22T00:00:00', ''\],
\['True', 'world'\]\]
get_formatted_columns_from_sheet_name
get_formatted_columns_from_sheet_name(record, sheet_name, col_indices=None)
Returns the string representation of columns from an Excel sheet referenced by sheet name
Args:
record (IBOCRRecord): original IBOCRRecord passed in using INPUT_IBOCR_RECORD
sheet_name (str): name of the desired sheet in the record
col_indices (List<int>): list of columns to be retrieved; if None, all columns are returned
Returns:
Returns the columns from the sheet as a list of list of cells, where each cell is a string representation of the cell.
Examples:
get_formatted_columns_from_sheet_name(INPUT_IBOCR_RECORD, ‘sheet name 1’, col_indices=[0,1,2])
\-> \[\['hello', '1.0'\],
\['2020-01-22T00:00:00', ''\],
\['True', 'world'\]\]
get_formatted_groups_from_sheet_index
get_formatted_groups_from_sheet_index(record, sheet_index, key_index, col_indices=None)
Returns the string representation of groups from an Excel sheet referenced by sheet index
Args:
record (IBOCRRecord): original IBOCRRecord passed in using INPUT_IBOCR_RECORD
sheet_index (int): index of the desired sheet in the record
key_index (int): column index to use as the keys of the groups
col_indices (List<int>): list of columns to be retrieved; if None, all columns are returned
Returns:
Returns a mapping from key to row. For each row, the value in the key_index column is the key. The mapped value is a list of the other cells in the row, where each cell is a string representation of the cell.
Examples:
get_formatted_groups_from_sheet_index(INPUT_IBOCR_RECORD, 2, 0, col_indices=[0,1,2])
\-> {'hello': \['1.0'\],
'2020-01-22T00:00:00': \[''\],
'True': \['world'\]}
get_formatted_groups_from_sheet_name
get_formatted_groups_from_sheet_name(record, sheet_name, key_index, col_indices=None)
Returns the string representation of groups from an Excel sheet referenced by sheet name
Args:
record (IBOCRRecord): original IBOCRRecord passed in using INPUT_IBOCR_RECORD
sheet_name (str): name of the desired sheet in the record
key_index (int): column index to use as the keys of the groups
col_indices (List<int>): list of columns to be retrieved; if None, all columns are returned
Returns:
Returns a mapping from key to row. For each row, the value in the key_index column is the key. The mapped value is a list of the other cells in the row, where each cell is a string representation of the cell.
Examples:
get_formatted_groups_from_sheet_name(INPUT_IBOCR_RECORD, ‘sheet name 1’, 0, col_indices=[0,1,2])
\-> {'hello': \['1.0'\],
'2020-01-22T00:00:00': \[''\],
'True': \['world'\]}
get_formatted_rows_from_sheet_index
get_formatted_rows_from_sheet_index(record, sheet_index, row_indices=None)
Returns the string representation of rows from an Excel sheet referenced by sheet index
Args:
record (IBOCRRecord): original IBOCRRecord passed in using INPUT_IBOCR_RECORD
sheet_index (int): index of the desired sheet in the record
row_indices (List<int>): list of rows to be retrieved; if None, all rows are returned
Returns:
Returns the rows from the sheet as a list of list of cells, where each cell is a string representation of the cell.
Examples:
get_formatted_rows_from_sheet_index(INPUT_IBOCR_RECORD, 0, row_indices=[0,1,2])
\-> \[\['hello', '1.0'\],
\['2020-01-22T00:00:00', ''\],
\['True', 'world'\]\]
get_formatted_rows_from_sheet_name
get_formatted_rows_from_sheet_name(record, sheet_name, row_indices=None)
Returns the string representation of rows from an Excel sheet referenced by sheet name
Args:
record (IBOCRRecord): original IBOCRRecord passed in using INPUT_IBOCR_RECORD
sheet_name (str): name of the desired sheet in the record
row_indices (List<int>): list of rows to be retrieved; if None, all rows are returned
Returns:
Returns the rows from the sheet as a list of list of cells, where each cell is a string representation of the cell.
Examples:
get_formatted_rows_from_sheet_name(INPUT_IBOCR_RECORD, ‘sheet name 1’, row_indices=[0,1,2])
\-> \[\['hello', '1.0'\],
\['2020-01-22T00:00:00', ''\],
\['True', 'world'\]\]
get_groups_from_sheet_index
get_groups_from_sheet_index(record, sheet_index, key_index, col_indices=None)
Returns the dict representation of groups from an Excel sheet referenced by sheet index
Args:
record (IBOCRRecord): original IBOCRRecord passed in using INPUT_IBOCR_RECORD
sheet_index (int): index of the desired sheet in the record
key_index (int): column index to use as the keys of the groups
col_indices (List<int>): list of columns to be retrieved; if None, all columns are returned
Returns:
Returns a mapping from key to row. For each row, the value in the key_index column is the key. The mapped value is a list of the other cells in the row, where each cell is a dictionary representation of the cell in the format {’type’: <cell_type>, ‘value’: <value>}.
Examples:
get_groups_from_sheet_index(INPUT_IBOCR_RECORD, 2, 0, col_indices=[0,1,2])
\-> {'hello': \[{'type': 'cell\_number', 'value': 1.0}\],
'2020-01-22T00:00:00': \[{'type': 'cell\_blank', 'value': ''}\],
'True': \[{'type': 'cell\_text', 'value': 'world'}\]}
get_groups_from_sheet_name
get_groups_from_sheet_name(record, sheet_name, key_index, col_indices=None)
Returns the dict representation of groups from an Excel sheet referenced by sheet name
Args:
record (IBOCRRecord): original IBOCRRecord passed in using INPUT_IBOCR_RECORD
sheet_name (str): name of the desired sheet in the record
key_index (int): column index to use as the keys of the groups
col_indices (List<int>): list of columns to be retrieved; if None, all columns are returned
Returns:
Returns a mapping from key to row. For each row, the value in the key_index column is the key. The mapped value is a list of the other cells in the row, where each cell is a dictionary representation of the cell in the format {’type’: <cell_type>, ‘value’: <value>}.
Examples:
get_groups_from_sheet_name(INPUT_IBOCR_RECORD, ‘sheet name 1’, 0, col_indices=[0,1,2])
\-> {'hello': \[{'type': 'cell\_number', 'value': 1.0}\],
'2020-01-22T00:00:00': \[{'type': 'cell\_blank', 'value': ''}\],
'True': \[{'type': 'cell\_text', 'value': 'world'}\]}
get_rows_from_sheet_index
get_rows_from_sheet_index(record, sheet_index, row_indices=None)
Returns the dict representation of rows from an Excel sheet referenced by sheet index
Args:
record (IBOCRRecord): original IBOCRRecord passed in using INPUT_IBOCR_RECORD
sheet_index (int): index of the desired sheet in the record
row_indices (List<int>): list of rows to be retrieved; if None, all rows are returned
Returns:
Returns the rows from the sheet as a list of list of cells, where each cell is a dictionary representation of the cell in the format {’type’: <cell_type>, ‘value’: <value>}.
Examples:
get_rows_from_sheet_index(INPUT_IBOCR_RECORD, 0, row_indices=[0,1,2])
\-> \[\[{'type': 'cell\_text', 'value': 'hello'}, {'type': 'cell\_number', 'value': 1.0}\],
\[{'type': 'cell\_date', 'value': 48350.0}, {'type': 'cell\_blank', 'value': ''}\],
\[{'type': 'cell\_boolean', 'value': 1}, {'type': 'cell\_text', 'value': 'world'}\]\]
get_rows_from_sheet_name
get_rows_from_sheet_name(record, sheet_name, row_indices=None)
Returns the dict representation of rows from an Excel sheet referenced by sheet name
Args:
record (IBOCRRecord): original IBOCRRecord passed in using INPUT_IBOCR_RECORD
sheet_name (str): name of the desired sheet in the record
row_indices (List<int>): list of rows to be retrieved; if None, all rows are returned
Returns:
Returns the rows from the sheet as a list of list of cells, where each cell is a dictionary representation of the cell in the format {’type’: <cell_type>, ‘value’: <value>}.
Examples:
get_rows_from_sheet_name(INPUT_IBOCR_RECORD, ‘sheet name 1’, row_indices=[0,1,2])
\-> \[\[{'type': 'cell\_text', 'value': 'hello'}, {'type': 'cell\_number', 'value': 1.0}\],
\[{'type': 'cell\_date', 'value': 48350.0}, {'type': 'cell\_blank', 'value': ''}\],
\[{'type': 'cell\_boolean', 'value': 1}, {'type': 'cell\_text', 'value': 'world'}\]\]