Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.4j

Application v 5.22b

  

 

Chapter EightData Functions (continued)

CSVWriteRecord Function

Overview

The CSVWriteRecord function takes the current output buffer contained with the CSV Object and writes it to a Basic File Object.

Syntax/Parameters

Syntax

int = CSVWriteRecord ( handle hCSV, handle hTarget );

Parameters

hCSV

A handle to a valid CSV Object.

hTarget

A handle to a Basic File Object.

Return Value

Returns an int as ERROR_NONE or formatted error code on failure. On handle errors, code will contain the bits ERROR_DT_SOURCE or ERROR_DT_DESTINATION depending on the failed parameter.

Remarks

Upon completion of the function, the output buffer is reset so that the CSV Object is ready to append additional fields.

To add a UTF-8 header, perform a manual write to the Basic File Object prior to writing CSV.

WriteBlock(hFileObject, "\xEF\xBB\xBF");

The content of the data written should then be UTF-8.

Related Functions

Platform Support

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

Legato IDE, Legato Basic