Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter EightData Functions (continued)

DataSheetToTable Function

Overview

The DataSheetToTable function takes the entire contents of the data sheet and returns it as a string table. The sheet may be specified by handle or opened directly from a compatible file.

Syntax/Parameters

Syntax

string [][] = DataSheetToTable ( handle hSheet, [boolean null] );

string [][] = DataSheetToTable ( string name, [int sheet], [boolean null] );

Parameters

hSheet

A handle to a Data Sheet object. Or,

name

A string specifying a compatible file (XDS) to load the sheet data from.

sheet

An optional int as zero-based sheet number. This parameter can only be used if the name parameter is supplied. If omitted, the first sheet is loaded.

null

An optional boolean as TRUE or FALSE. When set to TRUE, cells that are spanned over (merged) will be loaded with the text “}null{” otherwise, if FALSE, those cells are returned as an empty string. The default is FALSE.

Return Value

A string table containing the entire contents of the control as each cell’s display text. The array will be empty on error. Since empty strings are invalid data, the GetLastError, IsError or IsNotError function must be used to determine if an error occurred.

Additional textual information is available by using the GetLastErrorMessage function when a syntax error is returned with respect to the content of source file.

Remarks

Spanned cells are returned as empty string entries unless the null parameter is set to TRUE or non-zero. Using the null cell option allows readers of the table to determine if a cell was spanned over.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic