Write Specified Cell

Operation Name

Write Specified Cell

Function Overview

Write input data to an Excel file specifying cells.

Data Model

Table model type.
If [Specify format/comment in Mapper to write] is checked, it is XML type.

Properties

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 the name to show 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.

You can click [Browse] button to launch file chooser and find the file.
  • A file with ".xlsx" or ".xlsm" extension is processed as an Excel workbook, and a file with other extension is processed as an Excel 2003 workbook.
  • Specify the file path as an absolute path of DataSpider File System.
  • Except for the path separator “/”, restricted characters of DataSpider File System cannot be used.
Cell settings Optional
-
Specify cells to be written to.

Each column can be operated with the following buttons.
  • [Add]:
    Add a column.
  • [Up]:
    Move the selected column upwards by one row.
  • [Down]:
    Move the selected column downwards by one row.
  • [Delete]:
    Delete the column.
 
Cell settings/Sheet name Required Available Select or enter a sheet of the Excel file specified in [File].
  • When the entered sheet name that does not exist, the sheet will be created at the top of the workbook.
  • Case-insensitive.
Cell settings/Cell address Required Available Enter the cell address to be written to.
Example: A1
 
Cell settings/Cell name Optional Available Enter the cell name.
  • Values set in [Cell name] will be displayed in Mapper schema. It will not be used at the time of writing data.
Cell settings/Style Required Not available Select whether or not to write type / format information.
  • [Specify format]:
    Write type / format information.
  • [Use format of target cell]: (default)
    Write data using type / format information of the cell to be written.
  • When [Use format of target cell] is selected, the type / format information set in [Cell settings/Type] and [Cell settings/Format] will not be used.
Cell settings/Type Required Not available Select a cell type.
  • [General]: (default)
  • [Text]:
  • [Number]:
  • [Date]:
 
Cell settings/Format Optional Available Select or enter a format.
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 AM
#,##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 digits and if the value is less than the number of digits, fill it 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 input schema.
  • [Checked]:
    Elements to write format/comment are set in input schema.
  • [Not checked]: (default)
    Elements to write format/comment are not set in input schema.
  • When [Checked], the input schema will be in XML type.
  • Refer to “Input Schema” for more details.
Transaction
Item name Required/Optional Use of variables Description Remarks
Execute transaction processing Optional Not available Select whether or not to execute transaction processing.
  • [Checked]:
    Transaction processing will be executed.
  • [Not checked]: (default)
    Transaction processing will not be executed.
Refer to “Transaction of file category adapters” for more details.
 
Comment
Item name Required/Optional Use of variables Description Remarks
Comment Optional Not available You can write a short description of this adapter.
The description will be reflected in the specifications.
 

Schema

Input schema

Output schema

None.

Loading schema in Mapper

Schema is loaded automatically.
Refer to “Edit Schema” for more details.

Transaction

Transaction is supported.

Transaction is enabled only when [Execute transaction processing] of [Transaction] is checked.

PSP Usage

PSP is not supported.

Available Component Variables

Component variable name Description Remarks
message_category When an error occurs, the corresponding message code's category is stored.
  • Default value is null.
message_code When an error occurs, the corresponding message code is stored.
  • Default value is null.
message_level When an error occurs, the corresponding message code's severity is stored.
  • Default value is null.
error_type When an error occurs, the error type is stored.
  • Default value is null.
  • The error type will be in the following format.
    Example: “java.io.FileNotFoundException”
  • The contents that will be stored may vary depending on DataSpider Servista versions.
error_message When an error occurs, the error message is stored.
  • Default value is null.
  • The contents that will be stored may vary depending on DataSpider Servista versions.
error_trace When an error occurs, the error's trace information is stored.
  • Default value is null.
  • The contents that will be stored may vary depending on DataSpider Servista versions and client applications.

Specification Limits

Major Exceptions

Exception name Cause Solution
InputDataNotFoundException [Input data] is not specified. Specify [Input data] or draw a data flow.
InputDataReadException
Failed to read a format from input data.
A value entered in format element of input schema is invalid. Input a value output from "Generate Excel Format" logic in Mapper, or do not input any value if not necessary.
InvalidPropertyConfigurationException
File path is not specified.
[File] is not specified. Specify [File].
InvalidPropertyConfigurationException
Target cell is not specified.
[Cell settings] is not specified. Specify [Cell settings].
InvalidPropertyConfigurationException
Sheet name is not specified.
[Cell settings/Sheet name] is not specified. Specify [Cell settings/Sheet name].
InvalidPropertyConfigurationException
Cell address is not specified.
[Cell settings/Cell address] is not specified. Specify [Cell settings/Cell address].
InvalidStartCellAddressException:
The specified cell address is invalid.
The cell address entered in [Cell settings/Cell address] is invalid. Check [Cell settings/Cell address] and enter a valid cell address.
FileIsDirectoryException The path entered in [File] is directory. Enter a file path in [File].
IllegalFormatException Input data or [Format] is invalid for [Type] specified in [Cell settings]. Check the combination of type, input data, and format.
IllegalTargetWorkbookException The specified workbook is in a state cannot be written to. Another program might be using the file or the format of the workbook might be corrupted.
FileIsLockedException The file specified in [File] is being locked. Unlock it from Explorer or CLI.
java.io.FileNotFoundException
Some other process is using the file.
The file specified in [File] is being used by some other process. Make sure that it is not being used by some other process.
jxl.read.biff.PasswordException A password to open is set in the Excel 2003 workbook specified in [File]. Enter an Excel 2003 workbook in which a password to open is not set in [File].
jxl.write.biff.RowsExceededException The row number specified in [Cell address] exceeds the maximum value. Check values of [Cell settings].
jxl.read.biff.BiffException
Unable to recognize OLE stream
The Excel 2003 workbook specified in [File] is in an invalid state. Check the following.
  • Whether the file specified in [File] is an Excel 2003 workbook included in Supported Versions
  • Whether a file that is not Excel 2003 workbook is specified with ".xls" extension in [File]
  • Whether the file is corrupted
jxl.read.biff.BiffException
The file format is corrupt
The Excel 2003 workbook specified in [File] might be corrupted. Check the following.
  • Check whether the file specified in [File] is corrupted.
jxl.read.biff.BiffException
The input file was not found
The Excel 2003 workbook specified in [File] is in an invalid state. Check the following.
  • Whether the file with 0 bytes is not specified.
ZipEntryBrokenException:
The entry of the operating ZIP file is broken.
The Excel workbook specified in [File] is in an invalid state. Check the following.
  • Whether the file specified in [File] is an Excel workbook
  • Whether a file that is not Excel workbook is specified with ".xlsx" / ".xlsm" extension in [File]
  • Whether the file is corrupted
ZipEntryNotFoundException:
Entry of the specified name does not exist in the zip file
The Excel workbook specified in [File] is protected with password to open or is in an invalid state. Check whether password to open is set to the Excel workbook specified in [File], and whether the file is corrupted.

Notes