Excel Workbook
This is a pre-built action in Avo Assure and comes under @Excel element. The action instructs Avo Assure Client to copy one Excel file’s content to another.
Syntax
Input: <FilePath1> ;<FilePath2> ;< Option> (Optional) ;< text/special> (Optional)
Note:
The keyword supports copying the workbooks of file formats xlsx to xlsx and xls to xls only.
Example:
The workbook specified in FilePath1 (source) is copied to the workbook specified in FilePath2 (destination).
The workbook specified in FilePath1 (source) is copied to the workbook specified in FilePath2 (destination).
The copying of the workbooks can be changed based on the option provided below:
0 or empty (default): This option will append the unique workbook sheets to the destination workbook and replace the workbook sheets with common names.
For example,
WorkBook1: consists of Sheet1, Sheet2 and Custom_Sheet3.
WorkBook2: consists of Custom_Sheet1, Custom_Sheet2 and Custom_Sheet3.
After this option is used for the keyword, WorkBook2 will consist of Custom_Sheet1, Custom_Sheet2, Sheet1, Sheet2, and Custom_Sheet3 (overwritten from WorkBook1).
Copy Method: The copy method type (text/special) works as follows:
The ‘text’ option only copies the data. This method is not dependent on the system where the ICE is running.
The ‘special’ option copies all the data along with the formatting. This method depends on the system and will work only on the Windows OS installed on the Excel application.
This argument is case insensitive.
Its default value depends on the system's OS.
If the ‘copyWorkBook’ keyword is run on a Windows OS with an Excel application and the user provides no value for this argument, then ‘special’ will be the default copy method type.
If the ‘copyWorkBook’ keyword is run on any OS, NOT Windows, and the user provides no value for this argument, then ‘text’ will be the default copy method type.
Output: <Dynamic Variable> ;< Dynamic Variable> (Optional)
Usecase/Example
Scenario: Copying a Workbook for Data Backup
You are testing a Backup feature of an application. It verifies that the application correctly copies a specified workbook to a designated location, ensuring that all data and formatting are preserved. In a financial application, users need to create backups of their workbooks regularly to prevent data loss.
Input
C:\Users\pasarge.ganesh\Downloads\Userdetails.xlsx;Sheet 1
C:\Users\pasarge.ganesh\Downloads\Employeedetails.xlsx;Sheet 2
Expected Result
The data from excel sheet 1 in the userdetails workbook will be copied to sheet 2 in the employee details workbook.
Output
The output variable {Result} contains status of execution as Pass, which can be utilized for further excel work.
Last updated
Was this helpful?