F(x)

更新时间:
复制 MD 格式

Open

open(file, visible=False, readonly=False, password=None, write_password=None)

Description

Opens an Excel file.

Parameters

file<str>: The path to the file.

visible<bool>: Specifies whether the file is visible.

readonly <bool> (read-only)

password<str>: The password to open the file.

write_password<str>: The password for a write-protected workbook.

Return value

Returns an Excel object <Excel>.

Sample Call: rpa.app.microsoft.excel.open

# Note: Before you use this function, confirm that Microsoft software is installed.
# The following is a code example:
excel_file_path = r"D:\2_TestFileArchive\TestExcel.xlsx"
excel = rpa.app.microsoft.excel.open(excel_file_path,visible=True)

Create

create(visible=False)

Description

Creates a new Excel file.

Parameters

visible<bool>: Specifies whether the file is visible.

Return value

Returns an Excel object <Excel>.

Sample Call: rpa.app.microsoft.excel.create-

# Note: Before you use this function, confirm that Microsoft software is installed.
# The following is a code example:
excel = rpa.app.microsoft.excel.create(visible=True)

Catch

catch(name, mode='filename')

Description

Retrieves an object for an open Excel file.

Parameters

name<str>: The name or path of the file.

mode<str>: The mode used to find the file.

Options:

  • filename: The name of the file.

  • filepath: The file path.

Return value

Returns an Excel object <Excel>.

Example call: rpa.app.microsoft.excel.catch

# Note: Before you use this function, confirm that Microsoft software is installed.
# To get an Excel file by its name, enter the full file name including the extension.
# The following is a code example:
excel = rpa.app.microsoft.excel.catch('TestExcel.xlsx')