This is UltimateRPA Documentation
urpa.ExcelWorkbook Class Reference

This class represents a workbook in MS Excel. More...

Public Member Functions

def active_worksheet (self)
 This method returns an active sheet of an MS Excel workbook. More...
 
def sheets (self)
 This method returns a list of all sheets in an MS Excel workbook. More...
 
def full_name (self)
 This method returns a path and name for an MS Excel workbook. More...
 
def activate (self)
 This method activates (transfers to the foreground) a window tied to an MS Excel workbook. More...
 
def save (self)
 This method saves an MS Excel workbook. More...
 
def save_as (self, filename, format=None)
 This method saves an MS Excel workbook into a file with the passed name. More...
 
def add_worksheet (self)
 This method adds a new worksheet to an MS Excel workbook. More...
 
def close (self)
 This method closes an MS Excel workbook. More...
 

Detailed Description

This class represents a workbook in MS Excel.

Member Function Documentation

◆ activate()

def urpa.ExcelWorkbook.activate (   self)

This method activates (transfers to the foreground) a window tied to an MS Excel workbook.

◆ active_worksheet()

def urpa.ExcelWorkbook.active_worksheet (   self)

This method returns an active sheet of an MS Excel workbook.

Returns
Returns an ExcelWorksheet-type object; if no active workbook exists, it returns None.

◆ add_worksheet()

def urpa.ExcelWorkbook.add_worksheet (   self)

This method adds a new worksheet to an MS Excel workbook.

Returns
Returns an ExcelWorkbook-type object tied to a newly created worksheet of an MS Excel workbook.

◆ close()

def urpa.ExcelWorkbook.close (   self)

This method closes an MS Excel workbook.

◆ full_name()

def urpa.ExcelWorkbook.full_name (   self)

This method returns a path and name for an MS Excel workbook.

Returns
Returns a string containing the path and name of an MS Excel workbook (including the suffix).

◆ save()

def urpa.ExcelWorkbook.save (   self)

This method saves an MS Excel workbook.

◆ save_as()

def urpa.ExcelWorkbook.save_as (   self,
  filename,
  format = None 
)

This method saves an MS Excel workbook into a file with the passed name.

Parameters
filenamestr
formatstr or int
  • "XLSX" - Open XML Workbook
  • "XLS" - Excel 97-2003 Workbook
  • "CSV" - CSV
  • For an existing file, the default format is the last file format specified; for a new file, the default is the format of the version of Excel being used.

◆ sheets()

def urpa.ExcelWorkbook.sheets (   self)

This method returns a list of all sheets in an MS Excel workbook.

Returns
Returns a list of ExcelWorksheet-type objects.

The documentation for this class was generated from the following file: