You need to use Create new data table to create a new data table. Then use a For each loop to iterate through the %DataTableMatches% variable. This will result in a %CurrentItem% being created, which will contain the row and column indexes for a single matched value. So, for instance %CurrentItem['Row']% will contain the row index. You can use this to reference a row in the %ExcelData% table.
The problem here is that for some reason PAD returns those indexes as strings and they cannot be used to reference a cell. They must first be converted to numeric values. So, use Convert text to number on %CurrentItem['Row']% to convert it to a valid numeric index. Let's say you'd store it in %RowIndex%.
You can then finally get a row using this index. You can get it as %ExcelData[RowIndex]%. You can use it in the Insert row into data table action to insert the row to the new table you created.
So, essentially, more or less like this:
- Create new data table
- For each %CurrentItem% in %DataTableMatches%:
- Convert %CurrentItem['Row']% to number and store it into %RowIndex%
- Insert row %ExcelData[RowIndex]% to the new data table
- End loop
Hope this makes sense.
-------------------------------------------------------------------------
If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.
I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.