I have some data with multiple columns and rows in excel. If a certain cell is below a threshold, I want to delete the entire record by deleting the row. How can I do this?
All the best
Barry
I have some data with multiple columns and rows in excel. If a certain cell is below a threshold, I want to delete the entire record by deleting the row. How can I do this?
All the best
Barry
By the way, here is a sample job with a sample Excel sheet for the boring version of the job... It does everything that I mentioned above (I built based on the assumption that we are talking about Office 2007, but it shouldn't be much different for Office 2003)
| Attachment | Size |
|---|---|
| boo.xlsx | 17.57 KB |
| ParseExcel.waj | 18 KB |
Error is not blindness, error is cowardice
Brilliant Codex...thanks. Can't wait to see the cool version of this.
All the best
Barry
where's the cool verison????
Well.. looking back at that time 2009 version 2.0 was released! From that time, to today, I reckon that a lot of changes have taken place. I hope you're running the latest version Abraham
:)
Samantha
Rome wasn't built in a day..
Do you want the boring or the cool answer to this question? I can only provide one at a time! Here we go:
1) Boring Answer
Well, the obvious way of automating this task is the boring one:
- Read the data from Excel.
- Loop through each data row (I would do it with the "Loop" action since indexers will proove really useful).
- Check the contents of column X (the column that contains the cell-in-question) and determine through a conditional if the number is greater than the threshold.
- If it is not, just write %""% to every cell of the specific row.
Then, the only thing that you have to do, is open the Excel, select all your data, press F5 (Go To Window Pops Up), hit the "Special" button, then select Blanks and hit the OK button. Then depending on the version of Excel that you have, you will need to select Edit, Delete, select the Entire Row option and click OK (office 2003) or on the Home ribbon under cells category you will have to select Delete - Delete Cells - Entire row.
Pretty easy solution but also really boring. Brb with the really COOL solution! (need to create a job for it)
Error is not blindness, error is cowardice
Error is not blindness, error is cowardice