Steer with the Excel UI Engine 3.0

You can steer the following Excel features with the Excel UI Engine 3.0:

Steer Microsoft Excel worksheets

The Excel UI Engine 3.0 treats an entire worksheet as a single table with additional technical properties, which you can steer as described in chapter "Table".

Note the following when you steer a worksheet:

    • The first read-only row with column letters, which is above the first row of the worksheet, is included in the table and by default chapter "Scan tables".

    • The first read-only column with row numbers, which is to the left of column A in the worksheet, is included in the table and by default chapter "Scan tables".

Additional technical properties of Excel cells

  • BackgroundColor: set or verify background color using the format R=<x>,G=<y>,B=<z>, e.g. R=255,G=0,B=0 for bright red background.

  • Comment: use this property to add, update, verify, or perform other operations on the Excel Comment associated with a particular cell.

  • Font: set or verify the name of the font used for the cell, e.g. Arial Black.

  • FontColor: set or verify font color using the format R=<x>,G=<y>,B=<z>, e.g. R=255,G=0,B=0 for bright red font.

  • FontSize: set or verify number indicating font size.

    Note that Excel rounds numbers to the nearest .5, e.g. an input of 11.3 will be rounded to 11.5.

  • FontStyle: set or verify if the text in the cell is bold and/or italic, e.g. Bold Italic indicates that it is both.

  • FormattedText: verify or perform read-only operations on the text content of a cell.

  • Formula: set or verify the formula for the cell, e.g. =SUM(A1:A2) for the sum of the values in cells A1 and A2.

  • HasFormula: verify whether the cell has a formula, e.g. True for a cell with a formula.

  • IsHidden: set or verify whether the cell is hidden, e.g. True for a hidden cell.

  • IsLocked: set or verify whether the cell is locked, e.g. False if the cell is not locked.

  • Note: use this property to add, update, verify or perform other operations on the Excel Note associated with a particular cell.

  • NumberFormat: use this property to set, verify or perform other operations using the formatting string for a particular cell. For more information, see the Microsoft documentation.

    Some of the formatting syntax is language-specific with regard to the language settings in Microsoft Excel.

    As an example, NumberFormat==0.0% in an English version of Microsoft Excel is equivalent to NumberFormat==0,0% in a German version of Microsoft Excel.

  • Underline: set or verify underlining for the text in the cell, e.g. Double for double underlined text.

Steer embedded controls

Microsoft Excel provides two separate sets of controls which you can have in your worksheets:

  • Form Controls: used to reference and interact with cell data without using VBA code.

  • ActiveX Controls: used to design extensive and custom project requirements, with or without the use of VBA code.

The table below lists all Excel controls that you can scan and steer withTosca.

Name of Excel control

Type

Identified in XScan as

Button

Form Control

Button

Check Box

Form Control

CheckBox

Combo Box

Form Control

ComboBox

List Box

Form Control

ListBox

Option Button

Form Control

RadioButton

Check Box

ActiveX Control

CheckBox

Combo Box

ActiveX Control

ComboBox

Command Button

ActiveX Control

Button

Label

ActiveX Control

Label

List Box

ActiveX Control

ListBox

Option Button

ActiveX Control

RadioButton

Text Box

ActiveX Control

TextBox

Toggle Button

ActiveX Control

Button

Spin Button

ActiveX Control

Button

You can scan and steer WinForms controls embedded in worksheets using the DotNet Engine 3.0. To do so, right-click the Excel window in Tosca XScan and select DotNet from the engine list. For more information on scanning with Tosca XScan, see chapter "Navigate the Tosca XScan UI".

Toggle Button

XScan identifies an ActiveX Toggle Button as a standard Button control. You can steer it as described in chapter "Button".

The state of the Toggle Button is defined by the additional property Selected. You can use the following values:

  • True, if the Toggle Button is selected (on).

  • False, if the Toggle Button isn't selected (off).

In this example, you verify if a Toggle Button inside an Excel worksheet is currently selected. To do so, you verify if the Value of the property Selected is True.

Verify the state of a Toggle Button

Spin Button

Spin Button has two components: the up arrow and down arrow buttons. XScan can scan each component of an ActiveX Spin Button as an individual Button. You can steer them as described in chapter "Button".

Use the additional property SpinNumericButtonName to identify each of these components.

In this example, you verify if two buttons are part of the same Spin Button inside an Excel worksheet. You perform the following steps:

  • You verify if the property SpinNumericButtonName for Button Up is set to SpinButton1 Up.

  • You verify if the property SpinBumericButtonName for Button Down is set to SpinButton1 Down.

Verify if two buttons are part of the same Spin Button

Steer Microsoft Excel dialogs

Excel UI Engine 3.0 allows you to steer Microsoft Excel dialogs by creating a separate module for each dialog that you want to steer.

To steer Microsoft Excel dialogs, follow the steps below:

  1. Open the dialog window that you want to steer.

  2. From Tosca Commander, scan it with Tosca XScan as an application.