Version

xamSpreadsheet - Recordable Actions

Topic Overview

Purpose

This topic provides information about recordable actions for testing the XamSpreadsheet control.

XamSpreadsheet Recordable Actions

SelectCells

Description

Select the identified propertygrid item

Parameters

The following table summarizes the action parameters followed by code examples where applicable.

Parameter Description

sSelectionString

A string representing the items to be selected. Examples: "A1" "D5:G15" "D:F" "MyNamedReference" "C14:D20,G1"

Possible exceptions

The following is the only possible exception to this action and the likely reason causing them.

  • The selection string provided [sSelectionString] was invalid.

SetCellData

Description

Set the value for the supplied cell

Parameters

The following table summarizes the action parameters followed by code examples where applicable.

Parameter Description

sCellArg

string identifier for the cell.

oNewValue

object value or formula string to be set to the cell

oeEditType

Optional parameter, string, integer index or enumerated value representing a value from sshtExitEditType, on how the value should be applied to the selected cells. The default value sshtUpdateActiveCellOnly

Possible exceptions

The possible exceptions to this action and the likely reason causing it is:

  • Object [Workbook] is null or has been disposed.

  • The following SpreadsheetCell [sCellArg ] was not found.

  • Unable to enter edit mode

AddSheet

Description

Adds a new sheet to the xamSpreadsheet workbook

Possible exceptions

The following list contains the possible exceptions to this action and the likely reason causing them.

  • The point required to perform the operation is not visible.

  • The [AddNew Worksheet button] is not enabled.

ActivateSheet

Description

Activates the identified sheet

Parameters

The following table summarizes the action parameters followed by code examples where applicable.

Parameter Description

oSheetArg

Zero based integer index or string name to identify the worksheet

Possible exceptions

The following list contains the possible exceptions to this action and the likely reason causing them.

  • Object [Workbook] is null or has been disposed.

  • The specified Worksheet index [oSheetArg ] is out of range

  • The following Worksheet [oSheetArg ] key was not found.

  • The following Worksheet [oSheetArg ] was not found.

RenameSheet

Description

Renames the identified sheet

Parameters

The following table summarizes the action parameters followed by code examples where applicable.

Parameter Description

oSheetArg

Zero based integer index or string name to identify the worksheet

sNewName

New string name for the worksheet

Possible exceptions

The following list contains the possible exceptions to this action and the likely reason causing them.

  • Object [Workbook] is null or has been disposed.

  • The specified Worksheet index [oSheetArg ] is out of range

  • The following Worksheet [oSheetArg ] key was not found.

  • The following Worksheet [oSheetArg ] was not found.

SelectSheet

Description

Selects the identified sheet

Parameters

The following table summarizes the action parameters followed by code examples where applicable.

Parameter Description

oSheetArg

Zero based integer index or string name to identify the worksheet

bSelectTo

Optional parameter, if false selects only that new sheet, if true selects all the sheets to this sheet from the currently active sheet. The default value is false.

Possible exceptions

The following list contains the possible exceptions to this action and the likely reason causing them.

  • Object [Workbook] is null or has been disposed.

  • The specified Worksheet index [oSheetArg ] is out of range

  • The following Worksheet [oSheetArg ] key was not found.

  • The following Worksheet [oSheetArg ] was not found.

DeselectSheet

Description

Deselects the identified sheet

Parameters

The following table summarizes the action parameters followed by code examples where applicable.

Parameter Description

oSheetArg

Zero based integer index or string name to identify the worksheet

Possible exceptions

The following list contains the possible exceptions to this action and the likely reason causing them.

  • Object [Workbook] is null or has been disposed.

  • The specified Worksheet index [oSheetArg ] is out of range

  • The following Worksheet [oSheetArg ] key was not found.

  • The following Worksheet [oSheetArg ] was not found.

  • Cannot deselect the currently active sheet.

SetZoomLevel

Description

Sets the level of zoom

Parameters

The following table summarizes the action parameters followed by code examples where applicable.

Parameter Description

iZoomLevel

Optional Integer value representing the level of zoom from 10-400, 100 being the default zoom level.

Possible exceptions

The following list contains the possible exceptions to this action and the likely reason causing them.

  • The specified value [iZoomLevel ] is out of range.

PerformCommand

Description

Perform the supplied command.

Parameters

The following table summarizes the action parameters followed by code examples where applicable.

Parameter Description

oeCommand

An enumerated value, string name, or integer representing a value from the sshtCommandType type enumeration.

Possible exceptions

The only possible exception to this action and the likely reason causing it is:

  • The option supplied is not one of the valid options, valid options are [sshtCommandType values]

NameSelection

Description

Types a name into the FormulaNameBox, which either selects the named reference, selects the cells identified by the string, or names the currently selected cells.

Parameters

The following table summarizes the action parameters followed by code examples where applicable.

Parameter Description

sNewSelectionName

string to send to the NameBox

Possible exceptions

The following list contains the possible exceptions to this action and the likely reason causing them.

  • The [FormulaBar NameBox] is not enabled.

  • FormulaBar is not visible

  • This action cannot be performed while in edit mode.

Description

Visit the hyperlink in the supplied cell.

Parameters

The following table summarizes the action parameters followed by code examples where applicable.

Parameter Description

sCellArg

string identifier for the cell

Possible exceptions

The following list contains the possible exceptions to this action and the likely reason causing them.

  • Object [Workbook] is null or has been disposed.

  • The following SpreadsheetCell [sCellArg] was not found.

  • There was no Hyperlink found in the supplied cell.

Related Content

Topics

The following topics provide additional information related to this topic.

Topic Purpose

This topic provides information about the replay only user actions for testing the XamSpreadsheet™ control.

This topic provides reference information about the xamSpreadsheet’s custom properties embedded to objects of the identified types via the Control Property Access methods.

This topic provides reference information about the XamSpreadsheet™ control’s test object properties.

This topic provides reference material on the common enumerations used for testing the XamSpreadsheet™ control.