Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter EightData Functions (continued)

DataSheetOpen Function

Overview

The DataSheetOpen function creates a Data Sheet Object and imports to the content as XML (XML Data Sheet, XDS, format).

Syntax/Parameters

Syntax

handle = DataSheetOpen ( string filename, [int sheet] );

Parameters

filename

A string as a fully qualified filename and path for the source data. The file can be XML Data Sheet format, delimited (.dat) or comma separated (.csv).

sheet

An optional int specifying the zero-based sheet position to load. The position is measured by the order of the sheets, not the index set in the sheet properties (as specified by the <s> tag in the XML).

Return Value

Returns a handle to a Data Sheet Object or NULL_HANDLE on failure. Use the GetLastError function to retrieve error information.

Remarks

DataSheetOpen effectively combines the DataSheetCreate and DataSheetImport functions. The source file is not locked and is immediately released after the import function completes. Any errors in processing the source data will result in a NULL_HANDLE being returned.

A Data Sheet object can be used to manage a group of data. The data can be displayed, edited or exported. Data Sheet objects offer spreadsheet capabilities, including inserting rows, columns, and cells, altering cell attributes, and bulk data manipulation. This function creates an empty Data Sheet object. To pull a data sheet from the edit window, use the DataSheetGetObject function.

The Data Sheet object should be closed using the CloseHandle function.

See the Appendix B — XML Data Sheet Format Specification for additional information.

Related Functions

Platform Support

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

Legato IDE, Legato Basic