Steer Excel files
To steer Microsoft® Excel files, you have to create Excel Engine 3.0 TestCases. The Standard subset contains all Modules that you need to create an Excel TestCase.
You can find these Modules under Standard modules->TBox XEngines->Excel.
For information on how to create TestSteps from Modules, see chapter "Create TestSteps from Modules".
Structure of Excel TestCases
Excel Engine 3.0 TestCases require the following base structure:
-
Access an Excel file with the Module TBox Open Excel Workbook.
The Excel Engine 3.0 accesses the file in the background. It does not actually open the file on the machine.
-
Run your Excel operation(s):
-
If you want to manipulate a particular data range, use the following Modules:
First, use the Module TBox Define Excel Range to define the data range that you want to steer.
Then use the TBox Excel Range Manipulation Module to steer the data.
-
If you want to create a new worksheet in an existing file, use the Module TBox Create Excel Worksheet.
-
If you want to run a macro on your file, use the Module TBox Run Excel Macro.
-
-
Save and close the file with the Module TBox Close Excel Workbook. Saving the file is optional.
In this example, you steer data in an Excel file. The first TestStep opens the file test.xlsx, which is located at C:\Temp\Data. You assign the name SampleWorkbook to the file. In the second TestStep, you assign the name UserList to the data range that you want to steer. Additionally, you specify the following:
In the third TestStep, you steer the data in the data range UserList. The Excel Engine 3.0 looks for the first data row ($1) and performs the following actions:
The fourth TestStep saves and closes the file.
Manipulate data in an Excel file |