Brutal 164 Posted June 22, 2013 Report Share Posted June 22, 2013 I scrape a table.table has xxxxx rows - 7 columns i want my bot to check column 3 to see if a specific number exists if number exists then - save entire row to new tableelse if number does not exist then - do nothing I just can't seem to get my mind around the code for something like this. Anyone able to share an example? Quote Link to post Share on other sites
nuc63 27 Posted June 22, 2013 Report Share Posted June 22, 2013 Guaranteed way to work is.Set new table positionSet positionLoop table row totalSet a variable to table cell row position column 3If variable = number Then save cell 0 cell 1 etc to new table( using set table cell)Increment new table position Else Increment position Don't have access to pc this weekend if you still can't get this to work by Monday on me. Quote Link to post Share on other sites
Brutal 164 Posted June 22, 2013 Author Report Share Posted June 22, 2013 Thanks man - I'm going to give it a go! I appreciate the help. Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted June 23, 2013 Report Share Posted June 23, 2013 clear table(&original)create table from file("ORIGINAL TABLE", &original)clear list(%new csv)set(#row, 0, "Global")loop($table total rows(&original)) { if($contains($table cell(&original, #row, 3), "NUMBER HERE")) { then { add item to list(%new csv table, "{$table cell(&original, #row, 0)},{$table cell(&original, #row, 1)},{$table cell(&original, #row, 2)},{$table cell(&original, #row, 3)},{$table cell(&original, #row, 4)},{$table cell(&original, #row, 5)},{$table cell(&original, #row, 6)}", "Delete", "Global") } else { } } increment(#row)}save to file("save to new csv file", %new csv table) 1 Quote Link to post Share on other sites
Brutal 164 Posted June 23, 2013 Author Report Share Posted June 23, 2013 Massive THANKS to you TJ ... Very appreciated! Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.