Link Search Menu Expand Document

CSVDocument.Save Method

Explanation Save CSV data in Writer object.

Added since Ver.4.2.0, From here-->If the internal character code is Unicode CSV Document, the character code of the saved CSV file will be Unicode.
Till here<--

Since AI Ver.1.0.1 and onwards, the internal character code will always be in UTF-8.
Call format csvdoc.Save( writer [, cond1 [, cond2, … ] ] )

Since Version 5.0.3, the following formats are possible
csvdoc.Save( writer [, delimiter [, cond1 [, cond2, … ] ] ] )
Return value None
Arguments Object writer WriterObject to save to
String delimiter Change the delimeter character during the output from the default comma (,).
Can be spcified by using "d = [delimiter character]".Only one character can be specified for the delimiter.
For tab delimiter, specify it as "d = \ t".
If delimiter is changed, no quotes will be executed.

If the second argument is not considered as a delimiter specification, it is considered as a Search condition specification.

Added since Ver.5.0.3
String cond Search criteria that specify the rows to be saved

Specify in the same format as the Load method.
Can specify as many search conditions as desired, as long as the maximum are same as number of columns, and if more than one is specified, combine them with AND.
Exception CSV-11 Valid Write object is not specified
CSV-12 Not support WriteString(string) method
Example of use
    var csvdoc = new CSVDocument;
    var res = session.Get("http://server/sample.csv");
    csvdoc.Load(res);
    var fs = new FileSystem;
    var fp = fs.Open("sample.csv", FileSystem.OPEN_WRITE);
    csvdoc.Save(fp);
    fp.Close();
    
Related item Load method