GoFiler Legato Script Reference
Legato v 1.5b Application v 5.24b
|
Table of Contents | < < Previous | Next >> |
Chapter Eight — Data Functions (continued)
Overview
The TableToText function exports the content of a table to text with tabs. The function can return a string, write to a file or store in a Pool object.
Syntax/Parameters
Syntax
string = TableToText ( string[][] table, [dword flags], [string file | handle pool );
Parameters
table
An array of string data which must resolve to two-dimensions.
flags
An optional dword specifying the options to use while creating the data. The default value is write the key names as a header (TTT_KEY_NAMES_TO_HEADER).
file
An optional string specifying a destination filename and path to write the resulting data. This parameter cannot be used with the pool parameter.
pool
An optional handle to a Pool object to place the resulting data. This parameter cannot be used with the file parameter.
Return Value
Returns a string as the result or empty string on failure. Use the GetLastError function to retrieve error information. The GetLastErrorMessage function can return additional error information.
If the file or pool parameter is used, the result will be “OK” if the function succeeds with the result placed in the specified destination.
Remarks
The TableToText takes the context of a table and writes it as tab (0x09) delimited rows and rows delimited by line endings. It is important to note that is the table contains strings with tab characters, it will create an ambiguous field results.
The flags options are as follows (type can be ORed with options):
Term | Code | Description | ||||
TTT_CRLF_LINE_ENDING | 0x00000000 | Line ending as CR/LF (absence of flag) | ||||
TTT_SIMPLE_LINE_ENDING | 0x00000001 | Use CR only line endings | ||||
TTT_KEY_NAMES_TO_HEADER | 0x00000002 | Convert key names to as first row | ||||
TTT_ADD_UTF_8_HEADER | 0x00000008 | Add UTF-8 header/prefix |
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.