Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Haresh
Contributor
Contributor

How to read specific line characters from an excel file using tjava talend

I have an script that reads into the excel file retrieved from the ftp site and check for specific keyword namely or a variable row which has this keyword as: $$WORD$$ ABC

So based on the word if its ABC i have to assign some value to one of the variable and use it like name=ABC

and if $$WORD$$ XYZ then i have to assign the variable name such as string name=XYZ

this particular $$WORD$$ ___ could be in any row or column,how do i find and parse it using java?

(BufferedReader br =

new

BufferedReader(

new

FileReader(str)))

{

for

(

int

i =

0

; i < n; i++)

br.readLine();

line = br.readLine();

}

My main concern here is how to read within the file for a specific keyword match and retrieve the results given the fact that $$WORD$$ could be in any row or column of that file

And if there is no $$WORD$$ throw an error out

II.And also when i am trying to use these headers i am getting the error in package:

import org.apache.poi.hssf.usermodel.HSSFWorkbook;

import org.apache.poi.ss.usermodel.Cell;

import org.apache.poi.ss.usermodel.Header;

import org.apache.poi.ss.usermodel.Row;

import org.apache.poi.ss.usermodel.Sheet;

import org.apache.poi.ss.usermodel.Workbook;

PACKAGE ORG.APACHE.POI cannot be resolved?

Labels (6)
1 Reply
Anonymous
Not applicable

Can I ask why you are writing this i Java instead of using the Talend Excel components to bring your data into your job? There might be an easier and more maintainable way of achieving your goal