Why does this Filter Rows command not work?
回答済みI have a file with these contents:
AJE Number,Fiscal Year,Bucket Code,Balance Type Code,AJE Type,Comments
2020-001,2020,A1,ACT,NORM,
,,,,,
I am trying to remove the empty row so I have a Filter Rows command as per:
Command: Filter Rows
Search pattern: ^[ \t]*$
Search pattern type: regex
Case insensitive: false
Inverse: false
Columns: All
However it does not work - the output has all rows removed:
AJE Number,Fiscal Year,Bucket Code,Balance Type Code,AJE Type,Comments
I also tried regex ^\s*$ but it does not work either. Please guide me.
-
Hi Waldo, you may want to try looking for an "empty" row of commas such as with
^[", ]*$ (or ^[, ]*$ if you don't have double quotes in your data)
I haven't tested the above regular expression, but it should match instances of commas only.
0My understanding was that if I do not specify which column to search, it will apply the regex to each column individually. Are you saying that is inaccurate and that it will apply the regex to the whole row and not per column?
0Something is not right. I feed it this file:
AJE Number,Fiscal Year,Bucket Code,Balance Type Code,AJE Type,Comments
2020-001,2020,A1,ACT,NORM,
2020-002,2020,A1,ACT,GAAP,To recognize GF interest expense
,,,,,with these params:
Command: Filter Rows
Search pattern: ^[", ]*$
Search pattern type: regex
Case insensitive: false
Inverse: false
Columns: Alland it generates:
AJE Number,Fiscal Year,Bucket Code,Balance Type Code,AJE Type,Comments
2020-002,2020,A1,ACT,GAAP,To recognize GF interest expenseWhy would it remove the line
2020-001,2020,A1,ACT,NORM,
0I figured it out. The comparison is an OR comparison. So it will skip rows where any column is empty. So when no column index is specified, if any column is empty it will skip the row. Not what I want. I ended up doing this which works:
Command: Filter Rows
Search pattern: ^[^" ]+$
Search pattern type: regex
Case insensitive: false
Inverse: true
Columns: All0サインインしてコメントを残してください。
コメント
4件のコメント