How to use function more matches (3) and write in excel with same row

  1. pdf has more item, then I use 3mathes (with Regex) and assign column
    2.then I try to add item with you For each / Mathes = so 3 For each
    3.I got data but there are not same row, it created new row

@Suniagoz

Can you show me the image how you are adding the data

Hi,

Can you try as the following?

Let’s say there are3 IEnumerable<Match> type MatchData : MatchData1, MatchData2 and MatchData3

First, Iterate MatchData1 using ForEach. And set idx at Index property of ForEach

Next, in the loop, we can get data from MatchData2 in same index of MatchData1 using MatchData2(idx).Value

Write them into the row.

Please note that this assumes there are same items in each MatchData.

It may be good to use regex group as another approach.

Regards,

image

@Suniagoz

are you using 3 for each activity to loop through 3 Matcheddata?

better to use write range workbook outside of for each

output index ?? do I need to creat a new variable to collect data matches

@Suniagoz

array_matches={match1,matches2,matchs3}

then use for each for array_matches

inside for each use another for each

for add data to excel as do did in the above

Hi,

I just wrote a simple sample. can you check the following?

Sample20230823-4L.zip (3.3 KB)

Regards,

1 Like

thk u so much , Finally I got that and more understand about For each

1 Like

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