SilkTest 2010 - How to create an automation client for Microsoft Excel by using Micro Focus SilkTest 2010 .Net script
This article demonstrates how to create an Automation client for Microsoft Excel by using Micro Focus SilkTest 2010 .Net script.
Add a reference via the properties pane to the Microsoft.Office.Interop.Excel.dll. The following code creates and instance of Excel, opens a specific Workbook and Worksheet. (See KB Article 32535 for instructions on adding a Microsoft Office reference).
Note: This object is not visible to the user by design.
The Worksheet “sheet1” is assigned to the oWorksheet object and the used range of the worksheet is assigned to the oRange object. Each row and column in the used range is read and in this example is displayed in a messagebox.
Note: The messagebox is available as a result of adding the reference System.Windows.Forms.
It is at this point that the user could use string/integer arrays to assign the vaules found in the various cells in the Worksheet for later use.