Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.6l

Application v 6.6b

  

 

Chapter Eight — Data Functions (continued)

DataSheetExport Function

Overview

The DataSheetExport function exports the content of a Data Sheet Object as XML (XML Data Sheet, XDS, format).

Syntax/Parameters

Syntax

int = DataSheetExport ( handle hSheet, string filename | handle hObject,
                                  [int format], [dword flags] );

Parameters

hSheet

A handle to a Data Sheet Object.

filename

A string as a fully qualified filename and path for the destination data. Or,

hObject

An object handle to a Basic File or Pool Object. The data will be appended to the object.

format

An optional int specifying the format to write. If not specified and a filename is specified, the extension is used to determine the format. If a destination object is used or the extension is not known, the default is XML (FT_XDS_II).

flags

An optional dword specifying flags for the export. See Remarks below. The default value is 0x00000000, or no flags.

Return Value

An int as ERROR_NONE (0) or a formatted error code.

Remarks

The formats supported are: FT_ANSI, FT_CSV, FT_HTML and FT_XDS_II. If the format is not known, it will default to FT_XDS_II.

The XML export does not write a schema or XML wrapper for XDS. This is done to facilitate the option of writing multiple sheets into a single output as a workbook.

The following bits can optionally be set for various export formats:

  Definition   Bitwise   Description  
  XML/XDS Flags          
    DS_EXPORT_NO_STYLE_INDEX   0x00000001   Do Not Output Style Index  
    DS_EXPORT_NO_COLUMN_LAYOUT   0x00000002   Do Not Output Column Layout  
  Non XDS Flags           
  General Flags           
    DS_EXPORT_OPTIONS_MASK   0x0FFFF000   Options Mask (format based)  
   Encoding           
    DS_EXPORT_ENCODING_MASK   0x00000003   CSV Export Encoding Mask  
    DS_EXPORT_ENCODING_RAW   0x00000000   Export as Raw (UTF-8, no header)  
    DS_EXPORT_ENCODING_ANSI   0x00000001   Export as ANSI (Convert from UTF-8)  
    DS_EXPORT_ENCODING_UTF_8   0x00000002   Export as UTF-8  
    DS_EXPORT_ENCODING_UNICODE   0x00000003   Export as Unicode  
   Line Endings (file only)           
    DS_EXPORT_LINE_ENDINGS_MASK   0x0000000C   File Export Line Endings Mask  
    DS_EXPORT_LINE_ENDINGS_CRLF   0x00000000   Return/Line Feed  
    DS_EXPORT_LINE_ENDINGS_LF   0x00000004   Line Feed (new line)  
    DS_EXPORT_LINE_ENDINGS_CR   0x00000008   Return  
  CSV Flags          
    DS_EXPORT_CSV_EXCEL_STYLE   0x00001000   Use Quotes Only when Required  
    DS_EXPORT_CSV_INHIBIT_HEADER   0x00002000   Do not Encoding Write Header  
    DS_EXPORT_CSV_SHEET_BOUNDARY   0x00004000   Insert a Sheet Boundary  
  HTML Flags          
    DS_EXPORT_XHTML   0x00001000   HTML as XHTML  
    DS_EXPORT_HTML_HEADER   0x00002000   Add Header/Footer  
    DS_EXPORT_HTML_COLUMNS_AS_FIXED   0x00004000   Do Not Adjust Column Widths  
    DS_EXPORT_CELL_NAMES   0x00008000   Export the Cell Names  
  Text Flags           
    DS_EXPORT_TEXT_PRINT_IMAGE   0x00001000   Export as Print Image (spaces)  
    DS_EXPORT_TEXT_INHIBIT_HEADER   0x00002000   Do not Encoding Write Header  
    DS_EXPORT_TEXT_SHEET_BOUNDARY   0x00004000   Insert a Sheet Boundary  

 

See the Appendix B — XML Data Sheet Format Specification for additional information. Legacy XDS (Mark I) cannot be exported from a Data Sheet Object.

Related Functions

Platform Support

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

Legato IDE, Legato Basic