Test Cell Types in Excel

To test the content of a cell in an Excel page, first extract the cell content, and then use a Test Values step to perform the actual test. This is essentially the same as what you would do in other page types, such as HTML. To determine the cell type of a cell would not be straightforward or even possible by just extracting the content of a cell and subsequently performing a test on it; for example, there is no way to determine whether a cell is blank or contains an empty text. Fortunately, Design Studio contains a step to perform such a test: the Test Cell Type step.

You can test six different cell types. They correspond directly to what you can test for in Excel using functions such as ISTEXT or ISNUMBER.

Blank

Corresponds to the Excel function ISBLANK.

Text

Corresponds to the Excel function ISTEXT.

Number

Corresponds to the Excel function ISNUMBER. This type also includes dates since they are represented as numbers in Excel.

Logical

Corresponds to the Excel function ISLOGICAL, which correlates to the type Boolean in Design Studio.

Error

Corresponds to the Excel function ISERROR.

Formula

Corresponds to the Excel function ISFORMULA.

The Test Cell Type works like any other test step. It tests that the cell type in the found range matches a specified type, and based on the result, determines whether to continue along the branch or skip the following steps. The step is described in further detail in Test Cell Type.

An important property of the Test Cell Type step is that it can test the type of many steps simultaneously. For example, consider how you would test an entire empty row. This test could be useful when looping over a document containing several identically structured tables separated by blank lines. The following figure shows how to configure the Test Cell Type step. In this example, the branch following the step is skipped, if the cells in the found range are all blank.


Blank Cell Test

The following figure shows how to configure the Range Finder such that it finds an entire row. In this case we have a named range called "row" that is set by a Loop in Excel step looping over rows and occurring before the Test Cell Type step. We have specified that the result should be the entire row by selecting Whole of Range for the Use property.


Range Finder Selecting an Entire Row