14-07-22 07:26 AM
Answered! Go to Answer.
19-07-22 08:20 AM
Dim bRemove as Boolean
Dim iColumn as integer
' Loop through each column
For iColumn = Collection_In.Columns.Count - 1 to 0 step -1
'For each Row as DataRow in Collection_In.Rows
bRemove=True
' Loop through every row for this column
For each Row as DataRow in Collection_In.Rows
if Trim(Row(iColumn).ToString()) & "" <> "" then
bRemove=False
exit for
end if
Next
if bRemove=True then
Collection_In.Columns.Remove(Collection_In.Columns(iColumn))
end if
Next
Collection_Out = Collection_In.Copy
It's VB code. For Code Properties settings:
* Inputs, a collection named "Collection In"
* Outputs, "Collection out".
Please note, the code above works only for Collection having String fields only. Please develop further if your Collection contains Flags, Numbers etc. It's basically a fork of "Remove Empty Rows" provided by Blue Prism.
Note: no guarantees given.
14-07-22 11:08 AM
18-07-22 01:31 PM
18-07-22 04:20 PM
19-07-22 05:58 AM
19-07-22 08:20 AM
Dim bRemove as Boolean
Dim iColumn as integer
' Loop through each column
For iColumn = Collection_In.Columns.Count - 1 to 0 step -1
'For each Row as DataRow in Collection_In.Rows
bRemove=True
' Loop through every row for this column
For each Row as DataRow in Collection_In.Rows
if Trim(Row(iColumn).ToString()) & "" <> "" then
bRemove=False
exit for
end if
Next
if bRemove=True then
Collection_In.Columns.Remove(Collection_In.Columns(iColumn))
end if
Next
Collection_Out = Collection_In.Copy
It's VB code. For Code Properties settings:
* Inputs, a collection named "Collection In"
* Outputs, "Collection out".
Please note, the code above works only for Collection having String fields only. Please develop further if your Collection contains Flags, Numbers etc. It's basically a fork of "Remove Empty Rows" provided by Blue Prism.
Note: no guarantees given.
20-07-22 03:06 PM
20-07-22 04:10 PM