Jump to content
UBot Underground

Recommended Posts

Hi guys,

 

I am hitting brain-block and hope you can help.

 

I am searching/looping through a csv file looking for a list of keywords. Once it finds a word in the csv file that is contained in my list, I want it to save that entire row into a new table.

 

 

I have figured out how to get it to save a list of the row numbers that i want to extract row data for, but still haven't figured out how to save the actual row data into a new list.

 

 

[if] table row [contains] -keyword

[then] add row to list

Seems so simple - yet it's kicking my butt.

Link to post
Share on other sites

try this

clear table(&www)
clear list(%qqq)
set(#pos, 0, "Global")
loop($table total rows(&www)) {
    set(#loop columns, 0, "Global")
    loop($table total columns(&www)) {
        if($comparison($table cell(&www, #pos, #loop columns), "=", "keyword")) {
            then {
                add list to list(%qqq, $plugin function("TableCommands.dll", "$list from table", &www, "Row", #pos), "Delete", "Global")
            }
        }
        increment(#loop columns)
    }
    increment(#pos)
}
Link to post
Share on other sites

Thanks BestMacros - That got me a lot closer to the goal than I was before.

 

Now the problem is that I need it to accept partial match on the keyword.

 

For example - if keyword is 45 BASIC   ...but cell content is #45 BASIC ENERGY SVC/MID

 

I would still want it to identify this and save that row.

 

I'm trying to figure it out using regex - but no luck so far.

  • Like 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...