Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
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