Best Tosca Excel Operations using Tbox Excel Modules to read and manipulate data

Problem: Bring in excel data to Tosca, and manipulate them like a table while using constraints, a new feature for Tosca 12.1!

Answer :

We can use a buffer and use constraints on specific cells that contain header/column attributes, just like a regular Tbox table in Tosca.

In this example, we will guide you through using the new Tbox Excel Modules for Tosca Commander 12.1+.  The new modules will be used to reference your excel sheet exactly like a modern Tbox Table. Something previously not possible with older versions of Tosca.

1)  Create a new project and select on a standard template of standard modules.  In here you’ll notice the new Tbox Excel modules are located at Tbox Standard Modules -> Tbox XEngines -> Excel.

2)  Next, drag the Tbox Open Excel Workbook module to our test case.  In it, we will enter the location of our workbook in the path variable and the Workbook Name will become an instance of that open workbook for use in the following steps.

3)  Drag the Tbox Define Excel Range module into the test case.  The Workbook Name will be brought from step #2 above, the Worksheet Name is the name of the worksheet in the excel file.   In our case, Sheet1.  The Range Name will be a variable used by Tosca Commander for future steps and is up to your discretion.   The Data Range is the cell range on the test sheet that we would like to read.  It uses the cell letter and number, in our case A1 to Z1000.  There is no real limit on size here but the larger the area the more processing and memory that will be required.

4)  Add to your Test case Tbox Excel Range Manipulation, we will use the range name setup in the previous step  – “R1”.  Next, we can use the Data Table attribute to manipulate the excel data like any other table in Tosca.  In our case, we wish to find the name of a product, set it as a constraint action mode, and then return its value from the excel sheet into our buffer called “Test_ExcelBuffer”.  

5)  Running the test steps we retrieve the correct value from the Excel File, and our buffer is now set to “Value3”.

Next, IT Career Hope, this is very helpful for all of you…

About The Author

4 1 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments

Related Posts

0
Would love your thoughts, please comment.x
()
x