Hi
I have a csv file where there are headers in second row and i want to read the csv file with column names instead of column index.
above image is for reference.
Hi
I have a csv file where there are headers in second row and i want to read the csv file with column names instead of column index.
above image is for reference.
Is there any way where i can read through column names ?
Because, column index might change but column names will remain same in future so .
You can read the data using read text file as string
Then use geenerate datatable…where you can remove the first row as well and automatically set the second row in your string as the header and output datatable will be as you need
Hope this helps
Cheers
If 1st row is not required to you, why don’t you start reading the data from B2 Range.
In generate datatable, only these optons are available. Should i add remove data row after generating datatable?
@praveena.nadi For that read from Read Range “B2”
@raja.arslankhan i cant use read range, its CSV file so.
Str.Split({Environment.Newline},2,StringSplitoptions.None)(1)
This will remove first and keep only from second then check the check box to use first row as column hewder
Cheers
Did you given correct separators?
what is the error or was it different?
If you can point what is different can guide in right direction
cheers
test.xlsx (8.9 KB)
Please try with above sample file. CSV file is not supporting here, so i created a new .xlsx file with the same data.
Please try converting this to csv and then give it a try.
thanks:)
Thanks Anil, its working as you guided.