Extracting data from specific Excel cells


Sometimes you will need to extract data from specific Excel cells rather than all of the data in the file. This article explains how to extract data from specific cells.



This procedure was written with:

  • Talend Open Studio for DI 5.0-r72978
  • JDK version: Sun JDK build 1.6.0_26-b03
  • Operating system: Windows XP SP3

Talend verified this procedure to be compatible with:

  • Data Integration releases: 4.2.3, 4.2.4, 5.0.0, 5.0.1, 5.0.2, 5.1.1



Use an Excel file, as follows:

This example will extract data from cells D4 and B7.



Create an example Job

Create a Job called ExtractSpecificCellDemo. The detailed component settings are as follows:









The tJavaRow code:

int seq= Numeric.sequence("s1",1,1);
if (seq == 4) {
    context.d4 = input_row.c4;
if (seq == 7) {
    context.b7 = input_row.c2;


In this Job, two context variables are defined to store the data extracted from the specific cells.


Execute the Job

Execute the Job. The following text is output to the console:

Starting Job ExtractSpecificCellDemo at 15:47 02/02/2012.
[statistics] connecting to socket on port 3733
[statistics] connected
[statistics] disconnected
Job ExtractSpecificCellDemo ended at 15:47 02/02/2012. [exit code=0]
Version history
Revision #:
4 of 4
Last update:
‎02-24-2019 11:07 PM
Updated by:
Labels (2)
Four Stars

here is the original reference:
"How to extract data from specific Excel cells"