2-2-1 CSV data format
Create a CSV file to input data to be printed on the form.
You can optionally specify a function in the CSV file.
Input data format
The input data that you specify must be a CSV file. Use the following format to specify functions.
Use a comma (,) as a delimiter.
Use line feeds to separate rows.
An item line that specifies the field names is required (as the first line).
You cannot use <start> or <end> as a field name.
Save the file in "UTF-8 (without BOM)" encoding.
If you use commas (,) or double quotation marks (") within the data, enclose the data in double quotation marks (") and specify the data as follows.
Symbol to output
Setting example
Output result
Description
Comma (,)
"100 Percent ,Grape Juice"
100 Percent ,Grape Juice
Commas within the data are handled as characters.
Double quotation mark (")
"100 Percent ""Grape Juice"""
100 Percent "Grape Juice"
For each double quotation mark (") in the data, add another one (") so that there are two consecutive double quotation marks.
Product Code,Product Name,Supplier Code,Classification Code,Unit,Unit Price,Inventory,Ordered,Order At,Discontinued 1,100% orange juice,100% Fruit Juice Orange,2,1,200g,¥200,10,100,0,0 2,100% grape,"100% Fruit Juice, Grape",2,1,200g,¥200,12,100,0,0 3,coffee mild,""Coffee Mild"",2,1,195g,¥190,12,200,0,0
Notes when the form layout is an Excel file
When the form layout is an Excel file, note the following points.
Date and time data must be entered in any of the following formats. If it is entered in any other format, an empty string will be output.
YYYY-MM-DDThh:mm:ss.sssZ (ex.:2020-07-24T20:00:00.000+0900)
yyyy-MM-dd (ex.:2020-07-24)
hh:mm:ss.sssZ (ex.:23:00:00.000Z)
If data is not input to a sheet with only tags (a sheet that does not have elements other than tags, such as fixed character strings), that sheet will not be output.
Specify a function
Specifying a function in the CSV file allows you to bypass specifying it in the API. This specification is optional.
Specify functions
Functions should be enclosed in the following tags and written before the input data. Functions enclosed in these tags are recognized as control commands.
<start> Command start <end> Command end
The format for specifying a function is as follows.
An empty line must not appear before the <start> line.
The line following <end> line must be an item line.
Functions defined in the data file will be prioritized over the settings specified in the API.
You can define multiple sets of <start> and <end> tags in a data file to specify different functions for each set. Once a function has been specified in a data file, the function retains its settings until they are changed by the same function.
When specifying a form definition in the "VrSetForm" function, note the following points.
The file format of the form definition must be unified.
For example, you cannot specify a XML file in the first "VrSetForm" function and an Excel file in the second "VrSetForm" function.
If you use a form definition in Excel format, you can specify only one Excel file per data file. You cannot specify more than one Excel file.
Note that different sheets in the Excel file can be specified.
A function called "VrSetForm" is specified before the data. As shown above, you can define one function per line between the <start> and <end> tags.
<start> VrSetForm=form/Sample/sample_ja1.xml,4 <end> "PublicationDate","OrderNumber","Supplier", "SupplierPostalCode","SupplierAddrCity","SupplierAddr1"... 03/01/2013,"1000476","WingArc Corporation","150-0044","Tokyo"... 03/01/2013,"1000476","WingArc Corporation","150-0044","Tokyo"... 03/01/2013,"1000476","WingArc Corporation","150-0044","Tokyo"... 03/01/2013,"1000477","WingArc Design","950-0911","Niigata... ... ...
By defining multiple sets of <start> and <end> tags and specifying the "VrSetForm" function, you can output the data using multiple form definitions in one data file.
<start> VrSetForm=form/svf/sample_1.xml,4 <end> "PublicationDate","OrderNumber","Supplier", "SupplierPostalCode","SupplierAddrCity","SupplierAddr1","Supplier... 03/01/2013,"1000476","WingArc Corporation","150-0044","Tokyo"... 03/01/2013,"1000476","WingArc Corporation","150-0044","Tokyo"... 03/01/2013,"1000476","WingArc Corporation","150-0044","Tokyo"... 03/01/2013,"1000477","WingArc Design","950-0911","Niigata... ... ... <start> VrSetForm=form/svf/sample_2.xml,4 <end> "PublicationDate","OrderNumber","Supplier", "SupplierPostalCode","SupplierAddrCity","SupplierAddr1","Supplier... 03/01/2013,"1000476","WingArc Corporation","150-0044","Tokyo"... 03/01/2013,"1000476","WingArc Corporation","150-0044","Tokyo"... 03/01/2013,"1000476","WingArc Corporation","150-0044","Tokyo"... 03/01/2013,"1000477","WingArc Design","950-0911","Niigata... ... ...
Supported functions
You can specify the following functions in data files.
VrSetForm
Usage
Specify a form layout
Function name
VrSetForm=XMLName,mode
Arguments
XMLName
Specify the path and file name of the form layout. If the form layout is an Excel file, also specify the sheet name ([<file_name>]<sheet_name>).
You can check the path and file name on the Resource screen in SVF Cloud Manager.
mode
Specifies whether to sort the data. You can specify it when the form layout is an XML file.
4
Sort - OFF
5
Sort - ON: Data will be sorted according to key order of the fields specified in the form definition.
Description
The process will be executed using the form layout specified here.
Example
For XML files
<start>
VrSetForm=form/Document/Quotation/Quotation.xml,5
<end>
For Excel files
<start>
VrSetForm=form/Document/Quotation/[Quotation.xlsx]Sheet1
<end>
For Word files
<start>
VrSetForm=form/Document/Quotation/Quotation.docx
<end>
SvfEncode
Usage
Specify SVF encoding of the form layout
Function name
SvfEncode=encode
Arguments
encode
The value you specify differs depending on the language of the forms to be output. For details on the values, see "Output forms in languages other than Japanese" in "SVF Cloud Administration Guide".
Description
This parameter is enabled when the form layout is an XML file and the locale is "English".
The setting here takes precedence over the parameter defaultSvfEncode.
Example
<start>
SvfEncode=MS932
VrSetForm=form/svf/sample_1.xml,4
<end>