GoFiler Legato Script Reference
Legato v 1.5b Application v 5.24b
|
Table of Contents | < < Previous | Next >> |
Chapter Eight — Data Functions (continued)
Overview
The DataSheetImport function imports the content of a data sheet as XML (XML Data Sheet, XDS, format) or CSV.
Syntax/Parameters
Syntax
int = DataSheetImport ( handle hSheet, string filename, [int sheet], [dword flags] );
Parameters
hSheet
A handle to a Data Sheet Object.
filename
A string as a fully qualified filename and path for the source data.
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).
flags
An optional dword specifying options for import. The default is 0x00000000.
Return Value
An int as ERROR_NONE (0) or a formatted error code. Use the GetLastErrorMessage to get the first error in the log.
Remarks
See the Appendix B — XML Data Sheet Format Specification for additional information.
File format selection is based on the file extension. If the extension is “.csv”, CSV import is selected. If the extension is “.dat”, it is assumed to be a delimited file as tabs, vertical bars, semicolons or commas. All other types are assumed to be XML.
The CSV import will detect if a file has a UTF-8 header, if none is present, it will convert the CSV fields from ANSI to Unicode characters and encoded as UTF-8. If the incoming source is 16-bit Unicode, the content is parsed as encoded as UTF-8.
The flags support DS_IMPORT_USE_PROGRESS which allows an open progress window to be attached. The import will range from 1-99%, as such phases should be used if the script requires more actions than just a simple import.
Related Functions
Platform Support
Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL
Legato IDE, Legato Basic
Table of Contents | < < Previous | Next >> |
© 2012-2024 Novaworks, LLC. All rights reserved worldwide. Unauthorized use, duplication or transmission prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and 11,210,456. GoFiler™ and Legato™ are trademarks of Novaworks, LLC. EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated with or approved by the U.S. Securities and Exchange Commission. All other trademarks are property of their respective owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software License Agreement.