With the Excel Plug-In (Beta) it is now possible to automate the content of an Excel worksheet. This plug-in is not designed solely for getting data from Excel sheets (please read Data Driven Testing here), but rather it offers you the opportunity to automate the cells, rows and columns of an Excel document. For example, if you want to validate the impacts of your add-on on Excel, then the Excel plug-in is definitely the correct tool for you. In addition to access to the Excel UI elements, there are also new adapters available:
Through these adapters it is also possible to interact with the objects provided by the Excel object model.
Set up the Excel Plug-In
- Please close all Ranorex tools
- Download and extract Ranorex-Office-Plug-in.zip to following location
“C:Documents and SettingsAll UsersApplication DataRanorex2Plugins” (for Windows XP) or “C:ProgramDataRanorex2Plugins” (for Vista, 7)”
- Start Ranorex Spy and check if the Plug-in was successfully loaded. Therefore, please open the About Dialog by clicking the Ranorex Logo.
Creating a new Project
We now create a new project, which will show briefly what’s possible with the new Excel Plug-In. In the example we perform a calculation (implemented in user code) and use one of the formulas (actions recorded by Ranorex Recorder) which should simulate an Add-On.
- Please create a new solution called ExcelPlugin_Test
- First we have to add a new reference to the project. The reference is necessary to use the adapters of the Excel Plug-In in our project. Please use following location to navigate to the Ranorex.Plugin.Office.dll
“C:Documents and SettingsAll UsersApplication DataRanorex2Plugins” (for Windows XP) or “C:ProgramDataRanorex2Plugins” (for Vista, 7)“