I need to create a flow that can process a CSV file and extract a specific column, ignoring the rest of the columns. The CSV to be processed can vary dramatically, so I need a solution that gets the header of the CSV and then only returns the column required.
For example, I could have a CSV like the following:
ColumnA|ColumnB|ColumnC
1|2|3
4|5|6
My flow needs to process the CSV and extract just, say, ColumnB and it’s data, so the final product would be:
ColumnB
2
5
Another file, however, could be configured as follows:
Col1|Col2|Col3|Col4
A|B|C|D
E|F|G|H
In this example, I might want Col3, so the final output would be:
Col3
C
G
Anyone have any clever ideas?
Solved! Go to Solution.
Hi @arpost,
Do you want to fetch a special column a csv file?
Could you please share a bit more about your scenario?
I create a csv file and get the column name from it.
split(string(first(variables('List'))),'",')
split(replace(replace(replace(item(), '"', ''), '}', ''), '{', ''), ':')[0]
Then you could check the link as below to fetch a dynamic column:
excel - How to fetch specific column data from xls in microsoft flow - Stack Overflow
Hi @arpost,
Do you want to fetch a special column a csv file?
Could you please share a bit more about your scenario?
I create a csv file and get the column name from it.
split(string(first(variables('List'))),'",')
split(replace(replace(replace(item(), '"', ''), '}', ''), '{', ''), ':')[0]
Then you could check the link as below to fetch a dynamic column:
excel - How to fetch specific column data from xls in microsoft flow - Stack Overflow
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Did you know that you could restore a deleted flow? Check out this helpful article.
User | Count |
---|---|
32 | |
31 | |
24 | |
24 | |
20 |
User | Count |
---|---|
60 | |
57 | |
43 | |
37 | |
28 |