Tuesday, November 17, 2015

Working with the Data Table Object

1.1.1        Add Sheet Method

Adds the specified sheet to the run-time Data Table
Syntax: DataTable.AddSheet (Sheet Name)
Example:
Variable=DataTable.AddSheet ("My Sheet").Add Parameter ("Time", "8:00")

1.1.2        Delete Sheet Method

Deletes the specified sheet from the run-time Data Table.
Syntax: DataTable.DeleteSheet SheetID
Example: DataTable.DeleteSheet "My Sheet“

1.1.3        Export Method

Saves a copy of the run-time Data Table in the specified location.
Syntax: DataTable.Export (Filename)
Example: DataTable.Export ("C:\flights.xls")

1.1.4        Export Sheet Method

Exports a specified sheet of the run-time Data Table to the specified file.
Syntax: DataTable.ExportSheet (Filename, DTSheet)
Example: DataTable.ExportSheet "C:\name.xls" ,1

1.1.5        GetCurrentRow Method

Returns the current (active) row in the run-time global data sheet.

1.1.6        GetRowCount Method

Returns the total number of rows in the longest column in the global data sheet or in the specified data sheet of the run-time Data Table.
Example:
rowcount = DataTable.GetSheet("My Sheet").GetRowCount

1.1.7        Get Sheet Method

Returns the specified sheet from the run-time Data Table.
Example: MyParam=DataTable.GetSheet ("My Sheet").Add Parameter ("Time", "8:00")

1.1.8        GetSheetCount Method

Returns the total number of sheets in the run-time Data Table.

1.1.9        Import Method

Imports the specified Microsoft Excel file to the run-time Data Table.
Syntax: DataTable.Import (Filename)
Example: DataTable.Import ("C:\flights.xls")

1.1.10     Import Sheet Method

Imports a sheet of a specified file to a specified sheet in the run-time Data Table.
Syntax:  DataTable.ImportSheet (Filename, SheetSource, SheetDest)
Example: DataTable.ImportSheet "C:\name.xls" ,1 ,"name"

1.1.11     SetCurrentRow Method

Sets the specified row as the current (active) row in the run-time Data Table.
Example: DataTable.SetCurrentRow (2)

1.1.12     SetNextRow Method

Sets the row after the current (active) row as the new current row in the run-time Data
Table.

1.1.13     SetPrevRow Method

Sets the row above the current (active) row as the new current (active) row in the run-time
Data Table.

1.1.14     Global Sheet Property

Returns the Global sheet of the run-time Data Table.
Example: DataTable.GlobalSheet.AddParameter "Time", "5:45"

1.1.15     Local Sheet Property

Returns the current (active) local sheet of the run-time Data Table.
Example: MyParam=DataTable.LocalSheet.AddParameter ("Time", "5:45")

1.1.16     Raw Value Property

Retrieves the raw value of the cell in the specified parameter and the current row of the run-time
Data Table.
Syntax: DataTable.RawValue ParameterID [, SheetID]
SheetID can be the sheet name, index or dtLocalSheet, or
dtGlobalSheet.

1.1.17     Value Property

Retrieves or sets the value of the cell in the specified parameter and the current row of the run-time Data Table.
Syntax:DataTable.Value(ParameterID [, SheetID])


No comments: