Confguring the tJavaRow component - 7.3

Excel

Version
7.3
Language
English
Product
Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Real-Time Big Data Platform
Module
Talend Studio
Content
Data Governance > Third-party systems > File components (Integration) > Excel components
Data Quality and Preparation > Third-party systems > File components (Integration) > Excel components
Design and Development > Third-party systems > File components (Integration) > Excel components
Last publication date
2024-02-21

Procedure

  1. Double-click tJavaRow to open its Basic settings view.
  2. Click Sync columns to make sure that the schema is correctly retrieved from the preceding component.
  3. In the Code field, enter the following code to display the data extracted from the specific Excel cells.
    int seq=Numeric.sequence("s1",2,1);
                  if (seq == 4) {
                      context.a4 = input_row.lastname;
                      }
                      if (seq == 1) {
                      context.b1 = input_row.firstname;
                      }
                      if (seq == 9) {
                      context.c9 = input_row.city;
                      }
                      if (seq == 6) {
                      context.d6 = input_row.zip;
                      }
    Note: In the Code field, input_row corresponds to the links to and from tJavaRow.
  4. Double-click tLogRow to open its Basic settings view and select the Table (print values in cells of a table) option for better display effect.