SaveCsvFile

<< Click to Display Table of Contents >>

Manual > Control Reference > Route > Route Methods >

SaveCsvFile


 

Write to a CSV file.

 


syntax

SaveCsvFile(

         fileName,

         data

         [,bHeader = FALSE]

         [,headerData]

         [,bDoubleQuatation = TRUE]

         [,bOverwrite = TRUE]

         [,bLastReturn = TRUE]

         [,separator = ","]

         [,dateTimeFormat = ""]

         [,bNullIsEmptyString = FALSE]

         )

 


Parameters

 

fileName

 

Type:

character

 

File name. If [ansi] is specified, it will be saved in ANSI format. If omitted, it will be saved in utf8 (with BOM).

 

data

 

Type:

Character Array

 

The variable in which the contents of the CSV file are stored. Usually, it is passed in the form of a two-dimensional array (data[ column, row]). If it is a one-dimensional array (data[ column]), there will be only one row.

 

bHeader

 

Type:

Boolean

 

When TRUE, the first line of the CSV file will be the title line.

 

headerData

 

Type:

One-dimensional character array

 

When bHeader is TRUE, the first line of the CSV file is regarded as the title line, and the contents of that title are set as a one-dimensional array (headerData [column]).

 

bDoubleQuatation

 

Type:

Boolean

 

When TRUE is specified, be sure to enclose each piece of data in double quotes.

When FALSE, enclose data in double quotes only when necessary.

This is necessary when the data contains a comma ",".

 

bOverwrite

 

Type:

Boolean

 

If TRUE, overwrite the file.

If FALSE, append to the file.

 

bLastReturn

 

Type:

Boolean

 

If TRUE, put a return character after the last record.

If FALSE, no return character will be placed after the last record.

 

separator

 

Type:

character

 

Delimiter. (Cannot be more than one character.)

 

dateTimeFormat

 

Type:

character

 

Date and time format. If nothing is specified, it is the same as %Y/%m/%d %H:%M:%S.

 

bNullIsEmptyString

 

Type:

Boolean

 

If the value is TRUE and N/A, it will be set to an empty string. If the value is FALSE, it will be set to "N/A".

 

Return Value

 

 

Type:

Boolean

 

FALSE - Failure. TRUE - Success.

 


hmtoggle_plus1Explanation

 

hmtoggle_plus1Example

 


Supported


Script Action

Browser script

×

Calculation Expression Syntax

 

 


reference