Append Rows To Worksheet
Append values to the end of the worksheet.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
content | null | ||
name | None | ||
header | False | ||
start | None |
param content: | Rows of values to append |
---|---|
param name: | Name of worksheet to append to |
param header: | Set rows according to existing header row |
param start: | Start of data, NOTE: Only required when headers is True |
Close Workbook
Close the active workbook.
Create Workbook
Create and open a new Excel workbook.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
path | None | ||
fmt | xlsx |
param path: | Default save path for workbook |
---|---|
param fmt: | Format of workbook, i.e. xlsx or xls |
Create Worksheet
Create a new worksheet in the current workbook.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
name | null | ||
content | None | ||
exist_ok | False | ||
header | False |
param name: | Name of new worksheet |
---|---|
param content: | Optional content for worksheet |
param exist_ok: | If False, raise an error if name is already in use |
param header: | If content is provided, write headers to worksheet |
Find Empty Row
Find the first empty row after existing content.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
name | None |
param name: | Name of worksheet |
---|
Get Active Worksheet
Get the name of the worksheet which is currently active.
Get Worksheet Value
Get a cell value in the given worksheet.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
row | null | ||
column | null | ||
name | None |
param row: | Index of row to read, e.g. 3 |
---|---|
param column: | Name or index of column, e.g. C or 7 |
param name: | Name of worksheet (optional) |
Insert Image To Worksheet
Insert an image into the given cell.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
row | null | ||
column | null | ||
path | null | ||
scale | 1.0 | ||
name | None |
param row: | Index of row to write |
---|---|
param column: | Name or index of column |
param image: | Path to image file |
param scale: | Scale of image |
param name: | Name of worksheet |
List Worksheets
List all names of worksheets in the given workbook.
Open Workbook
Open an existing Excel workbook.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
path | null |
param path: | path to Excel file |
---|
Read Worksheet
Read the content of a worksheet into a list of dictionaries.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
name | None | ||
header | False | ||
start | None |
Each key in the dictionary will be either values from the header row, or Excel-style column letters.
param name: | Name of worksheet to read |
---|---|
param header: | If True, use the first row of the worksheet as headers for the rest of the rows. |
Read Worksheet As Table
Read the content of a worksheet into a Table container. Allows sorting/filtering/manipulating using the `RPA.Tables` library.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
name | None | ||
header | False | ||
trim | True | ||
start | None |
Read the content of a worksheet into a Table container. Allows sorting/filtering/manipulating using the RPA.Tables library.
param name: | Name of worksheet to read |
---|---|
param header: | If True, use the first row of the worksheet as headers for the rest of the rows. |
param trim: | Remove all empty rows from the end of the worksheet |
param start: | Row index to start reading data from (1-indexed) |
Remove Worksheet
Remove a worksheet from the active workbook.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
name | None |
param name: | Name of worksheet to remove |
---|
Rename Worksheet
Rename an existing worksheet in the active workbook.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
src_name | null | ||
dst_name | null |
param src_name: | Current name of worksheet |
---|---|
param dst_name: | Future name of worksheet |
Save Workbook
Save the active workbook.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
path | None |
param path: | Path to save to. If not given, uses path given when opened or created. |
---|
Set Active Worksheet
Set the active worksheet.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
value | null |
param value: | Index or name of worksheet |
---|
Set Worksheet Value
Set a cell value in the given worksheet.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
row | null | ||
column | null | ||
value | null | ||
name | None |
param row: | Index of row to write, e.g. 3 |
---|---|
param column: | Name or index of column, e.g. C or 7 |
param value: | New value of cell |
param name: | Name of worksheet (optional) |
Worksheet Exists
Return True if worksheet with given name is in workbook.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
name | null |