Hi,
I'm currently working on a job to extract data from 9 cells in an excel document. Everything has worked well so far and the numbers are being extracted except for a small snag. There is one cell that has letters as well. If possible id like to be able to remove these letters and keep just the numbers. I've included a screenshot of the process I'm using as well as the results below that. The part underlined in red is what I'd like to remove. Any help would be much appreciated!
Thanks
I would read the cell at first as String value from Excel and if the value you showed us has always the same prefix: Integer.parseInt(row1.my_cell.substring(8)) and convert it to a integer.
Thanks for the response!
Im extremely new to talend and java as well so pardon me for any shortcomings i may have
where exactly would i put your code? should i plug that into the main code section? or is there somewhere specific i need to put it?
I would use it in tJavaRow_1.
I do not know exactly your code but I guess you write your value into a context variable of type Integer.
This scenario would looks like:
context.myValue = Integer.parseInt(row1.my_cell.substring(8));
and you use your context variable in the tFixFlow.