Append Rows To Worksheet

Arguments

  • content
  • name=None
  • header=False
  • start=None

Append values to the end of the worksheet.

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

Arguments

Close the active workbook.

Create Workbook

Arguments

  • path=None
  • fmt=xlsx

Create and open a new Excel workbook.

param path:Default save path for workbook
param fmt:Format of workbook, i.e. xlsx or xls

Create Worksheet

Arguments

  • name
  • content=None
  • exist_ok=False

Create a new worksheet in the current workbook.

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

Find Empty Row

Arguments

  • name=None

Find the first empty row after existing content.

param name:Name of worksheet

Get Active Worksheet

Arguments

Get the name of the worksheet which is currently active.

List Worksheets

Arguments

List all names of worksheets in the given workbook.

Open Workbook

Arguments

  • path

Open an existing Excel workbook.

param path:path to Excel file

Read Worksheet

Arguments

  • name=None
  • header=False
  • start=None

Read the content of a worksheet into a list of dictionaries.

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

Arguments

  • 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

Arguments

  • name=None

Remove a worksheet from the active workbook.

param name:Name of worksheet to remove

Rename Worksheet

Arguments

  • src_name
  • dst_name

Rename an existing worksheet in the active workbook.

param src_name:Current name of worksheet
param dst_name:Future name of worksheet

Save Workbook

Arguments

  • path=None

Save the active workbook.

param path:Path to save to. If not given, uses path given when opened or created.

Set Active Worksheet

Arguments

  • value

Set the active worksheet.

param value:Index or name of worksheet

Set Worksheet Value

Arguments

  • row
  • column
  • value
  • name=None

Set a cell value in the given worksheet.

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

Worksheet Exists

Arguments

  • name

Return True if worksheet with given name is in workbook.