Write

Operation name

Write

Function overview

Writes input data to an Excel file.

Data model

The data model of this component is table model type.

If Specify format/comment in Mapper to write is selected, it's XML type.

Properties

= Remarks =

For details on use of variables, refer to Variables.

Basic settings

Item name

Required/Optional

Use of variables

Description

Remarks

Name

Required

Not available

Enter a name that is used on the script canvas.

 

Input data

Required

Not available

Select a component on the script canvas.

 

Required settings

Item name

Required/Optional

Use of variables

Description

Remarks

File

Required

Available

Enter the Excel file path.

The Browse button launches a file chooser that allows you to select a file.

  • A file with ".xlsx" or ".xlsm" extension is processed as an Excel workbook, and a file with other extensions is processed as an Excel 2003 workbook.

Note

Sheet name

Optional

Available

Select or enter a sheet of the Excel file specified in File.

  • When the sheet name is omitted, if the file specified in File exists, data will be written in the first sheet. If it doesn't exist, a sheet named "Sheet1" will be created.

  • Case-insensitive.

Column list

Optional

-

Specify column name for each column.

Each column can be operated with the following buttons:

Up

Moves the selected column upward by one row.

Down

Moves the selected column downward by one row.

Add

Adds a column.

Delete

Deletes the column.

 

Column list/Column name

Required

Available

Specify a column name for each column.

 

Column list/Style

Required

Not available

Select whether or not to write type/format information.

Specify format

Write the specified type/format information.

Use format of target cell

(Default)

Write data using the type/format information of the cell to be written.

Use format of write starting row

Write data using the type/format information of the cell in the writing starting row.

  • When Use format of target cell or Use format of write starting row is selected, the type/format information set in Column list/Type and Column list/Format won't be used.

Column list/Type

Required

Not available

Select the type of Column name.

General

(Default)

Text
Number
Date

 

Column list/Format

Optional

Available

Select or enter a format for each type.

Symbol

Meaning

Available type

Example

yyyy

1900-9999 (A.D.)

Date

2005

yy

00-99 (A.D.)

Date

05

m

1-12 (numeric representation of month)

Date

1

mm

01-12 (numeric representation of month)

Date

01

mmm

Jan-Dec (abbreviated month)

Date

Jan

mmmm

January-December (month)

Date

January

mmmmm

J-D (the first letter of month)

Date

J

d

1-31 (date)

Date

1

dd

01-31 (date)

Date

01

ddd

Sun-Sat (abbreviated day of week)

Date

Mon

dddd

Sunday-Saturday (day of week)

Date

Monday

h

Hour (1-12)

Date

1

hh

Hour (0-23)

Date

01

h:m

Minutes

Date

1:1

h:mm

Minutes

Date

1:01

h:mm:s

Seconds

Date

1:01:1

h:mm:ss

Seconds

Date

1:01:01

#,##0

Currency

Number

123,0

0%

Percentage

Number

50%

#

Display only the significant digits

Number

Format

##.##

Input value

12.345

Output value

12.35

0

Display only the specified number of digits, and if the value has fewer than the specified number of digits, fill the remainder with 0

Number

Format

000.00

Input value

12.345

Output value

012.35

 

Specify format/comment in Mapper to write

Optional

Not available

Select whether or not to set elements for writing format/comment in the input schema.

Selected

Elements to write format/comment are set in the input schema.

Not selected

(Default)

Elements to write format/comment aren't set in the input schema.

  • When this field is selected, the input schema will be in XML type.

  • For details, refer to Input schema.

Property actions

Item name

Description

Remarks

Open Excel Wizard

Open the Excel Wizard with the file specified in File.

= Remarks =

For how to configure settings, refer to Excel Write Wizard.

  • Disabled when the specified file doesn't exist, when it's not an Excel file included in the supported versions, or when a variable is set in File.

  • When Sheet name is set, the sheet opens in Excel Wizard.

    When sheet name isn't set, when the specified sheet doesn't exist, or when a variable is set in Sheet name, the sheet that was displayed when saved in Excel application opens.

Update column list

Get column names and types from the first row values of the file specified in File and set them in Column list.

  • Disabled when the specified file doesn't exist or a variable is set in File.

Note

When the value of a target cell is empty, a different type from that of the target cell might be set to Column list/Type.

Write settings

Item name

Required/Optional

Use of variables

Description

Remarks

Insert column names in the first row

Optional

Not available

Select whether or not to insert column names into the first row of the specified file.

Selected

Insert column names into the first row. Format will be set as "General".

Not selected

(Default)

Don't insert column names.

 

Overwrite

Optional

Not available

Select whether or not to overwrite when data exists in the specified file.

Selected

(Default)

Overwrite. When the specified sheet doesn't exist, a new sheet will be created to write to.

Not selected

Don't overwrite. When the specified sheet exists, FileAlreadyExistedException is thrown and the processing fails.

 

Insert

Optional

Not available

Select whether or not to insert data when writing data to the specified file.

Selected

Insert to the first row of the specified file. When the specified sheet doesn't exist, a new sheet will be created to write to.

Not selected

(Default)

Overwrite.

  • Enabled when Overwrite is selected.

  • When the write position is specified, data will be inserted to the specified position.

  • The format of the inserted position will be applied. Even when Specify format is specified in Style, it will be ignored.

  • When the specified sheet doesn't exist, the format will be set as "General".

Delete target sheet

Optional

Not available

Select whether or not to delete the specified sheet before writing data to the specified file.

Selected

Delete. It will be ignored when the specified sheet doesn't exist.

Not selected

(Default)

Don't delete.

  • Enabled when Overwrite is selected.

Specify write position

Optional

Not available

Select whether to specify the start position for the write operation.

Selected

Specify the start position for the write operation.

Not selected

(Default)

The start position for the write operation is not specified.

 

Condition to specify starting cell

Optional

Not available

Select the condition for the cell where the write operation begin with.

Specify cell address

(Default)

Enter Starting cell address to start the writing process from the specified cell address.

Specify cell value

Enter Value of starting cell to start the writing process from the cell that matches with the specified value.

  • Enabled if Specify write position is selected.

  • Depending on selected method, the corresponding input field is displayed (Starting cell address/Value of starting cell).

Starting cell address

Optional

Available

Enter the cell address as the condition to start writing.

Example: A1

  • Enabled if Specify cell address is selected in Condition to specify starting cell.

Value of starting cell

Optional

Available

Enter the value of the cell used as the condition to start writing.

  • Enabled if Specify value of starting cell is selected in Condition to specify starting cell.

Transaction

Item name

Required/Optional

Use of variables

Description

Remarks

Execute transaction processing

Optional

Not available

Select whether or not to execute transaction processing.

Selected

Transaction processing will be executed.

Not selected

(Default)

Transaction processing won't be executed.

For details, refer to Transactions for the connectors in the File category.

Comment

Item name

Required/Optional

Use of variables

Description

Remarks

Comment

Optional

Not available

You can write a short description of this connector.

 

Schemas

Input schema

  • When Specify format/comment in Mapper to write isn't selected

    • It's table model type.

    • The number of columns varies depending on the Column list settings.

    = Remarks =

    For schema structure, refer to Table model type .

  • When Specify format/comment in Mapper to write is selected

    It's XML type.

    The schema structure is as follows:

    <?xml version="1.0" encoding="UTF-8"?>
    <table>
      <row>
        <column>
          <format></format>
        </column>
        <column>
          <format></format>
        </column>
           : 
      </row>
      <row>
        : 
      </row>
        : 
    </table>
    

    Element name

    Attribute name

    Description

    Remarks

    table

    -

     

     

    row

    -

     

     

    column

    -

    Represents the value to be written in the cell.

    • Appears once for each column set in Column list.

    format

    -

    Represents the format/comment to be written in the cell.

    • In this element, enter a string that is output from "Generate Excel Format" logic in Mapper.

      • The format selected in Column list/Style is overwritten with the format/comment output from "Generate Excel Format" logic.

      • Only the format/comment that is output from "Generate Excel Format" logic will be written. When format isn't written, the format selected in Column list/Style will be used as is.

      • When nothing is input, format/comment won't be written. The format selected in Column list/Style will be used as is.

Output schema

None.

Loading schema in Mapper

The schema is loaded automatically.

= Remarks =

For details, refer to Edit Schema.

Transaction

Transaction is supported.

 

Transaction is enabled only when Execute transaction processing of Transaction is selected.

Parallel Stream Processing

  • When Specify format/comment in Mapper to write isn't selected

    PSP is supported.

  • When Specify format/comment in Mapper to write is selected

    As the input schema is XML type, it can't be used in PSP.

= Remarks =

For details on PSP, refer to Parallel Stream Processing.

Available component variables

Component variable name

Description

Remarks

count

The number of written data records is stored.

  • The default value is null.

message_category

When an error occurs, the category of the message code corresponding to the error is stored.

  • The default value is null.

message_code

When an error occurs, the code of the message code corresponding to the error is stored.

  • The default value is null.

message_level

When an error occurs, the severity of the message code corresponding to the error is stored.

  • The default value is null.

error_type

When an error occurs, the error type is stored.

  • The default value is null.

  • The format of the error type is as follows.

    Example: java.io.FileNotFoundException

error_message

When an error occurs, the error message is stored.

  • The default value is null.

error_trace

When an error occurs, the trace information for the error is stored.

  • The default value is null.

Message codes, exception messages, and limitations

Connector

Message code

Exception message

Limitations

Messages and limitations of the Excel connector

check

check

check