Append Rows To Worksheet

Append values to the end of the worksheet.

Arguments

Argument Type Default value Description
contentnull
nameNone
headerFalse
startNone
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
pathNone
fmtxlsx
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
namenull
contentNone
exist_okFalse
headerFalse
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
nameNone
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
rownull
columnnull
nameNone
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
rownull
columnnull
pathnull
scale1.0
nameNone
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
pathnull
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
nameNone
headerFalse
startNone

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
nameNone
headerFalse
trimTrue
startNone

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
nameNone
param name:Name of worksheet to remove

Rename Worksheet

Rename an existing worksheet in the active workbook.

Arguments

Argument Type Default value Description
src_namenull
dst_namenull
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
pathNone
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
valuenull
param value:Index or name of worksheet

Set Worksheet Value

Set a cell value in the given worksheet.

Arguments

Argument Type Default value Description
rownull
columnnull
valuenull
nameNone
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
namenull