Refresh Office Application
Refreshes information in an Office file opened by IBM RPA Studio.
Command availability: IBM RPA SaaS and IBM RPA on premises
Script syntax
IBM RPA's proprietary script language has a syntax similar to other programming languages. The script syntax defines the command's syntax in the script file. You can work with this syntax in IBM RPA Studio's Script mode.
officeRefresh --officeapplication(OfficeApplication)
Dependencies
-
To use this command, open an Office file with the Open Office file (
officeOpen
) command. -
Microsoft™ Office 2010 or higher is required.
-
Ensure that the architecture (bitness) of your Office apps, IBM RPA, and your operating system match. For example, if you are using a 64-bit operating system, IBM RPA and Office must be 64-bit too.
Input parameters
The following table displays the list of input parameters available in this command. In the table, you can see the parameter name when working in IBM RPA Studio's Script mode and its Designer mode equivalent label.
Designer mode label | Script mode name | Required | Accepted variable types | Description |
---|---|---|---|---|
Office Application | officeapplication |
Required |
Office Application |
Variable that stores the Office file instance. |
Example
The Open Office File command opens an Excel file type, stored in the variable "officeApplication". Then the Refresh Office Application command uses this variable to update the information contained in the spreadsheet.
defVar --name ID --type Numeric
defVar --name officeApplication --type OfficeApplication
// Use a sample file.
officeOpen --path "Sample file" --type "Excel" --keepvisibleofficeApplication=officeapplication ID=processid
officeRefresh --officeapplication ${officeApplication}
❕ Important: To run the sample script, create or use a sample file.