Spreadsheet

Top  Previous  Next

 

Spreadsheet object. Use it to read and write Excel and text spreadsheets.

 

 

Action Summary

 

Action

Description

DoAttach

Attaches to a sheet from a spreadsheet file.

DoMoveToFirstRow

Moves to a first row in selected range.

DoMoveToLastRow

Moves to a last row in selected range.

DoMoveToRow

Moves to a given row.

DoRandom

Selects random row and column in the range.

DoSequential

Advances to the next row in the range.

GetCell

Gets cell value by its coordinates.

GetColumnCount

Gets columns count.

GetColumnName

Gets column name.

GetCurrentRowIndex

Get zero based current row index.

GetEOF

Is current position is beyond the spreadsheet range.

GetRowCount

Gets rows count.

SetRange

Sets cell range used in DoSequental and in DoRandom.

 

Action Detail

 

DoAttach(fileName, sheet)

Attaches to a sheet from a spreadsheet file.

 

Parameters:

 

Name

Type

Description

fileName

String

Excel or text file name.

sheet

String

Sheet name or separator for text file.
Optional.

 

Returns:

 

true, if successfull

 

DoMoveToFirstRow()

Moves to a first row in selected range.

 

DoMoveToLastRow()

Moves to a last row in selected range.

 

DoMoveToRow(rowInd)

Moves to a given row.

 

Parameters:

 

Name

Type

Description

rowInd

Number

Row index to set active.

 

DoRandom()

Selects random row and column in the range. The range is either set by SetRange or it is the default range that includes all rows (except first row which is considred to contain column names) and columns on the sheet.

 

Returns:

 

'false' if the the spreadhseet is not attached, 'true' - otherwise.

 

DoSequential()

Advances to the next row in the range. The range is either set by SetRange or it is the default range that includes all rows on the sheet except first row which is considred to contain column names. When the end of the range is reached DoSequential rewinds back to the first row in the range and returns 'false'.

 

Returns:

 

'false' if being called when active row is the last row or the spreadsheet is not attached, 'true' - otherwise.

 

GetCell(columnId, rowId)

Gets cell value by its coordinates. Returns current cell value after DoSequental or DoRandom if params not set.

 

Parameters:

 

Name

Type

Description

columnId

Number |
String

Column index or name. If not set ActiveColumn is used.
Optional.

rowId

Number

Row index. If not set ActiveRow is used.
Optional.

 

GetColumnCount()

Gets columns count.

 

Returns:

 

Number of columns in the spreadsheet.

 

GetColumnName(ind)

Gets column name.

 

Parameters:

 

Name

Type

Description

ind

Number

Column index.

 

Returns:

 

Name of column in the spreadsheet.

 

GetCurrentRowIndex()

Get zero based current row index.

 

GetEOF()

Is current position is beyond the spreadsheet range.

 

GetRowCount()

Gets rows count.

 

Returns:

 

Number of rows in the spreadsheet.

 

SetRange(startRow, endRow, startCol, endCol)

Sets cell range used in DoSequental and in DoRandom.

 

Parameters:

 

Name

Type

Description

startRow

Number

Start row index.

endRow

Number

End row index.

startCol

Number

Start column index.
Optional.

endCol

Number

End column index.
Optional.