Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
amenardie
Contributor
Contributor

Find a string and and extract data in line next to it

Hello,

I'm trying to extract data in an excel file which is just next to a string I would find by regex or any other way.

0695b00000ofFMYAA2.png

As you can see in the screenshot, there are multiple sections and i'm trying to extract the information "AD" just next to "[Comments].

I cannot extract a line count for this section and filter on it as it won't be at the same place. The files i will process do not contain all the same informations so it can be earlier or later in the document.

It maybe is easy, but i'm not seeing how to do it right now.

Have you any ideas how to achieve what I want ?

Thank you.

Labels (2)
2 Replies
Anonymous
Not applicable

Hi

Using tMemorizeRow to store the last row, read each line from Excel file, check if last row contains "[Comments]", if so, extract the value of current row, the job looks like:

tFileInputExcel--main--tMemorizeRow---tJavaRow

 

Take a look at the component documentation of tMemorizeRow

https://help.talend.com/r/en-US/8.0/tmemorizerows/tmemorizerows?tocId=PgOSyP91mt_dn5Fsn3EqXQ

 

Let me know if you have any questions.

 

Regards

Shong

amenardie
Contributor
Contributor
Author

Hello @Shicong Hong​,

 

I'm sorry, I don't really see how to achieve what you suggested as I never used tMemorizeRow.

Do you have any detailed exemple on what i can set up in my case ?

 

Thank you for your help!