Row extraction after a specific string in Excel

There is an Excel file containing 1~50 rows of data,
The rows containing data to be treated as column names will change each time.
For example, if there is a cell with “compound name” and “concentration” in row 10, we would like to treat row 10 as the column name and extract data from row 11 onward until the cell is empty.
With the row filter, only rows containing a specific string are extracted, and this is not possible.
Please advise.

Hi @uiruka009

Welcome to KNIME Forum!

Create an indicator to find the break points in your column. Combine the rows per breakpoints together into Groups e.g. with a Missing Value node (option next value). Then go for a Group Loop and modify you group (make the first a header (Insert Column header). And your are done :slight_smile:

Hope this helps, but I don’t think so.

Please upload a sample file (dummy data is no problem) with the original input and expected output. This makes it a way easier to find a proper solution.

gr. Hans

testsample.xlsx (10.7 KB)
Thank you for your reply.
It will be sample data, but Sheet1 is the original data and Sheet2 is the data I want to get.

1 Like

Hi @uiruka009

Tnx, an input and output sheet in the Excel helps!

I create this wf extract_rows.knwf (115.3 KB)

I hope it works for you!

gr. Hans

1 Like

@HansS
Thank you so much.
I can’t believe it, I got the table I wanted.
Plus, I am able to add more samples and elements!
I am new to Knime, so I will study the workflow you gave me!
Thank you very much!

1 Like

Hi @uiruka009

Glad this solution works for you.
Happy KNIME-ing!

gr. Hans

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.