Format of Importable Files (Simple Version)

Designer
This manual is in pilot operation.

File and Line Format

The file to be imported must be in CSV format (comma-separated values).

Each line consists of several key fields followed by the last field as the value field, which holds the value to be loaded.

Each key field corresponds one-to-one, and in order, to the dimensions used by the target ledger in the simple form, except those assigned to "Background" at the design time of the simple form.

Line breaks can be LF (Line Feed) or CR (Carriage Return). If LF and CR are consecutive (LF + CR, CR + LF), they are considered as a single line break.

The values of key fields and value fields should be separated by commas, with spaces before and after the commas ignored. Key fields and value fields can be enclosed in double quotes (if the value includes a comma, the entire value must be enclosed in double quotes). Line break characters within a double-quoted string do not count as the end of a CSV file line. If a double-quoted string within a value contains two consecutive double quotes, they are read as a single double quote.[1]

Blank lines in the import file are skipped.

Correspondence between Key Fields and Dimensions

After code conversion, the values of key fields are matched to dimension member labels. Translation tables are used for conversion. The code conversion specifications depend on the design (decided by the form designer).

The rules for mapping between key fields and dimensions are as follows:

  1. In the definition of the simple form, each dimension assigned to parameters, vertical axes, and horizontal axes corresponds to one key field (i.e., there are no key fields for dimensions assigned to "Background").

  2. The order of key fields is parameters ⇒ horizontal axes ⇒ vertical axes. If there are multiple dimensions within each "Position," they are ordered first by "Order" in ascending order, and then by dimension label in ascending order if the orders are the same.[2]

It’s okay if the CSV file contains multiple lines that correspond to the same combination of members after the values of key fields are converted. In that case, if the data type of the ledger cell corresponding to that combination of members is numeric (flow or balance), the cell value is cleared at the beginning of the process, and then the values of those multiple lines are sequentially added. If the data type is other than numeric, the value of the last line is written.

Value Field Format

The value in the value field can be an amount/number, boolean value, enumeration value, or string value, but it must match the data type of the destination ledger cell.

Numeric Format

Numeric data may include a plus sign (+), minus sign (-), commas for thousands separation (,), and decimal point (.).

  • Place the plus or minus sign either before or after the number. If no sign is present, the value is considered positive.

  • If using commas, enclose the entire numeric data in double quotes.

  • Limit decimal places to 4. Values with more than 4 decimal places will not be read correctly.

The sign of numeric data can be set to debit+, credit+, or according to the debit/credit type of the account (specified in the "Sign type" of the import specification).

When importing data by change account, set the sign according to the "Sign type" in the import specification for increase and decrease items as follows:

  • If the "Sign type" in the import specification is set to "debit+", then debit increase should be positive, and credit increase should be negative.

  • If the "Sign type" in the import specification is set to "credit+", then debit increase should be negative, and credit increase should be positive.

  • If the "Sign type" in the import specification is "according to account attribute," it is set according to the debit/credit type of the account:

    1. For debit accounts, if the "Sign" of the change account is "Balance or Increase," debit increase is considered positive, and if the "Sign" is "Decrease," debit increase is considered negative.

    2. For credit accounts, the opposite applies.

Boolean Format

To import boolean data, specify TRUE or FALSE in the value field (case-insensitive).

Enumeration Format

To import enumeration data, specify the label of the value in the value field (case-insensitive).

String Format

To import string values, specify the string in the value field. However, if the string includes a comma, ensure the entire string is enclosed in double quotes. If the string value contains double quotes, replace each double quote with two consecutive double quotes to avoid confusion with the double quotes that enclose the entire value.

Encoding

The encoding applied to the import file can be specified by the user at the time of operation (it does not depend on the form design). It’s crucial to specify the encoding correctly when loading string data that includes characters other than ASCII, such as Japanese characters. The encodings available for import from the browser are as follows:

  • UTF-8

  • Shift JIS

When importing using the requester, the encoding can be specified at the beginning of the request XML in the XML declaration.