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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

how to extract a value of a cell in the excel with tfileinputexcel

i want to extract a value in a cell, i dont want to have all the column.
Could u help me please?
Labels (2)
31 Replies
Anonymous
Not applicable
Author

Maybe to solve your problem we have to restart completely the analyse of your job, please answer to the following questions:
how many column have you xls file?
Did you have a look to plegall links?
Where do you want to put the value of your 3 cells?Do you want to put them in the same DB rowor in 3 different rows? What is your target fields name?
I'll do your job completely tomorrow
Anonymous
Not applicable
Author

thank u very much.
My purpose is to extract data from cells(B9 contain the name of activity,B8 contain the name of the project,K22 contain le nombre de non conformite and J7 contains the date) from different files excel that have the same format.then i want to put these all data in a table "audit" that has this syntax:
CREATE TABLE `staging_area`.`AUDIT` (
`ID_AUDIT` VARCHAR(30) NOT NULL default '',
`NON_CONFORMITE` NUMERIC NOT NULL default '0',
`ACTIVITY_NAME` VARCHAR(30) NOT NULL default '',
`DATE_AUDIT` DATE NOT NULL DEFAULT 0,
PRIMARY KEY(`ID_AUDIT`)
);
ID_AUDIT will have the value of B8,NON_CONFORMITE will contain the value of K22,ACTIVITY_NAME will contain the value of B9,DATE_AUDIT will contain the value of J7 as if i did an insert in the table audit.then i will use this table as a dimension and other tables to generate report.
the columns of the file are(A,B,C,E,F,G,H,I,J,K)
The data extracted from the same file will be in the same row :example("XX",5,"YY","12/10/2007"),(XX,5,YY and "12/10/2007") are in the same file.
Anonymous
Not applicable
Author

Ok
So I did your Job, I don't know if my method is the best one but it works well.
0683p000009MBhA.jpg 0683p000009MBxf.jpg 0683p000009MBxk.jpg 0683p000009MBOI.jpg 0683p000009MBkY.jpg 0683p000009MBxp.jpg 0683p000009MBtG.jpg
Anonymous
Not applicable
Author

before i use ur method i want to say u thank u very much for ur help!
Anonymous
Not applicable
Author

It did not work 0683p000009MPcz.png
i have this error message
Warning: Usage of a local non-builtin name
NumberFormatException For input string: "23/12/07"
NumberFormatException For input string: "Duration in h: "
The cell format is not Date in row 11 column 9
The cell format is not Date in row 12 column 9
The cell format is not Date in row 13 column 9
The cell format is not Date in row 14 column 9
The cell format is not Date in row 15 column 9
NumberFormatException For input string: "PR.MA.01"
The cell format is not Date in row 17 column 9
The cell format is not Date in row 18 column 9
The cell format is not Date in row 22 column 9
The cell format is not Date in row 35 column 9
Exception in component tAggregateRow_1_AGGOUT
java.lang.NumberFormatException: NumberFormatException For input string: "null"
at routines.system.ParserUtils.parseTo_float(ParserUtils.java:68)
Anonymous
Not applicable
Author

Ok I know where your problem comes from, put your colomn J format to String in your tfileExcel and change the code of the tjavarow to :
int seq= Numeric.sequence("topic970",1,1);
if (seq == 7) {
output_row.J7 = TalendDate.parseDate("dd-MM-yyyy",input_row.J);
}
if (seq == 😎 {
output_row.B8 = input_row.B;
}
if (seq == 9) {
output_row.B9 = input_row.B;
}
if (seq == 22) {
output_row.K22 = input_row.K;
}
Anonymous
Not applicable
Author

the problem is that each column can contain many types of data.So i can not specify for example for the column J the type DATE
Anonymous
Not applicable
Author

but if i put J format to string and so J7 i have this msg error
"Type mismatch: cannot convert from Date to String"
because DATE_AUDIT is a DATE type
Anonymous
Not applicable
Author

you have to let the J7 format in the output schema to Date, you just have to change the input schema and the tfileExcelinput schema J to String
If you use the new code of tjavarow you will convert the string to a date
Anonymous
Not applicable
Author

this exactly what i did i put J7 format to date but i get this msg
NumberFormatException For input string: "23/12/07"
NumberFormatException For input string: "Duration in h: "
Exception in component tJavaRow_1
java.lang.NullPointerException
at java.text.SimpleDateFormat.parse(Unknown Source)
at java.text.DateFormat.parse(Unknown Source)
23/12/07 is in J7
Duration in h: is in J8