Read from Sheet

Operation Name

Read from Sheet

Function Overview

Read Excel data from a sheet.

Data Model

Table model 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.  
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.
Sheet name Optional Available Select or enter a sheet of the Excel file specified in [File].
  • When sheet name is omitted, or the specified sheet does not exist, the first sheet will be read.
  • Case-sensitive.
Column list Optional - Specify columns.

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.
 
Column list/Column name Required Available Enter the column name.  
Column list/Type Required Not available Select the type of [Column name].
  • [General]: (default)
  • [Text]:
  • [Number]:
  • [Date]:
 
Property actions
Item name Description Remarks
Open Excel Wizard Open the Excel Wizard with the file specified in [File].
For how to configure, refer to "Excel Read Wizard".
  • Disabled when the specified file does not exist / when it is not an Excel file included in the supported versions / when a variable is set in [File].
  • When [Sheet name] is set, the sheet opens in Excel Wizard.
    When sheet name is not set, when the configured sheet does not exist, or when a variable is set in [Sheet name], the sheet displayed when saved in Excel application opens.
  • In Studio for Web, 50MB is the maximum file size that can be displayed on the Excel Wizard.
  • In Studio for Web, when the file size to be displayed exceeds 5MB, a confirmation dialog appears.
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 does not exist or a variable is set in [File].
  • When [Start condition] is set, the row that matches [Start condition] will be the target row.
  • When the value of a target cell is empty, a type different from that of the cell one might be set to [Column list/Type].
Start/End condition
Item name Required/Optional Use of variables Description Remarks
Specify reading start condition Optional Not available Select whether or not to specify the reading start condition.
  • [Checked]:
    Specify the reading start condition.
  • [Not checked]: (default)
    Do not specify the reading start condition.
 
Start condition Optional Not available Select a reading start condition.
  • [From cell that matches specified string]: (default)
    Start reading from the cell that matches [Match string].
  • [From specified cell address]:
    Start reading from [Cell address].
  • Enabled when [Specify reading start condition] is checked.
  • Depending on selected item, the corresponding input field ([Match string]/[Cell address]) is displayed.
Match string Optional Available Enter the match string for reading start condition.
  • Enabled when [From cell that matches specified string] is selected in [Start condition].
  • Case-sensitive.
Cell address Optional Available Enter the cell address for reading start condition.
Example: A1
  • Enabled when [From specified cell address] is selected in [Start condition].
  • Case-sensitive.
Specify reading end condition Optional Not available Select whether or not to specify the reading end condition.
  • [Checked]:
    Specify the reading end condition.
  • [Not checked]: (default)
    Do not specify the reading end condition.
 
End condition Optional - Specify the reading end condition.

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.
  • Enabled when [Specify reading end condition] is checked.
  • The rows preceding the reading end row will be the read target.
  • Refer to "Reading End Condition" for more details.
End condition/Column name Required Not available Select [Column name] in which reading end condition is to be checked.  
End condition/Row number Optional Available Enter the row number in which reading end condition is to be checked.
When [(Not specified)] is selected, the reading end condition will be checked for all rows.
  • When omitted, the reading end condition will be checked for all rows.
End condition/Condition value Optional Available Enter the condition value of reading end condition.
When [(Not specified)]is selected, regardless of the cell value, the row of [Row number] will be the reading end row.
  • When omitted, checking will be performed considering the empty string as the condition value.
End condition/And/Or Required Not available Select a boolean operator for [Condition value].
  • [AND]: (default)
  • [OR]:
 
Read settings
Item name Required/Optional Use of variables Description Remarks
Do not get first row as value Optional Not available Select whether or not to handle the first row of the specified file as data.
  • [Checked]:
    Do not handle as data.
  • [Not checked]: (default)
    Handle as data.
 
Read cell formula Optional Not available Select whether or not to read cell formula as data.
  • [Checked]:
    Read formula as data.
  • [Not checked]: (default)
    Do not read formula as data.
  • Disabled when an Excel workbook is specified in [File].
Data processing method
Item name Required/Optional Use of variables Description Remarks
Data processing method Required Not available Select data processing method.
  • [Apply script settings]: (default)
    Apply the mass data processing settings of the script property to the adapter.
  • [Do not perform mass data processing]:
    Mass data processing will not be performed.
  • [Perform mass data processing]:
    Mass data processing will be performed.
 
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

None.

Output schema

The number of columns varies depending on the [Column list] settings.
Refer to “Schema of table model type” for more details.

Loading schema in Mapper

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

Mass Data Processing

Mass Data Processing is supported.
When the file specified in [File] is an Excel workbook, mass data processing cannot be performed.

PSP Usage

PSP is supported.
Refer to “Parallel Stream Processing” for more details.

Available Component Variables

Component variable name Description Remarks
count The number of read data is stored.
  • Default value is null.
  • Value is not stored in PSP.
filePath The file path is stored.
  • Default value is null.
  • Value is not stored in PSP.
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.

Reading End Condition

Null and Empty Strings

Specification Limits

Major Exceptions

Exception name Cause Solution
InvalidPropertyConfigurationException
<property name> is not specified.
[<property name>] is not specified. Specify [<property name>].
FileIsDirectoryException The path entered in [File] is directory. Enter a file path in [File].
InvalidStartCellAddressException:
The specified starting cell address is invalid.
The cell address entered in [Cell address] is invalid. Check [Cell address] and enter a valid one.
java.io.FileNotFoundException The file specified in [File] does not exist. Check [File].
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.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.
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.