I have a few things in Excel I have not been able to figure out. I would greatly appreciate some advice.
How can I add gridlines to cells in excel aka “Format cells → Border”?
How can I delete the entire contents of a cell based on one word? Currently if I try find and replace activity, the word is deleted from the cell but the rest of the words remain. If a cell contains a certain word, I want all of the cells contents emptied/cleared.
Thank you. I have been able to fix item #2 regarding deleting cells in Excel with a specific value.
My highest priority now is item #3, deleting the blank rows. Anybody got any insight into how I can do this? I looked at the mentioned post and it doesn’t seem to specifically address my issue. I am using “extract data table” action to grab data from three webpages and write the info to excel.
Is there a way to delete all empty rows on the excel sheet after the data is written?
It would be a better approach if you delete the empty rows before writing table data to excel. You can use filter datatable to remove empty rows from the datatable output of “extract data table”.
But If you want to delete rows from excel you can try below steps
Read the excel data and store the data in a DataTable variable using Read Range activity inside the Excel Application Scope.
Use the For Each Row activity to iterate through the rows.
Inside the loop, use the If condition to check if the row is empty. Then, use the Delete Row activity for rows that meet the condition.
You can use the following condition: row.ItemArray.All(Function(x) String.IsNullOrEmpty(x.ToString.Trim))