I am trying to read a file , but it is throwing error at Line9 due to inconsistency of the columns present in file.
SampleFile.xlsx (10.3 KB)
I want to read it and put data into 3 diff datatable.
Sample Attached. Data is present in 3 different places in file. I want to read and segregate its data to use.
@Yoichi Can you please help?
ppr
(Peter Preuss)
3
we would assume that it is a text file / csv file but can only refer to the attached excel
In general we would handle this case as by following:
- read text file into lines - File.ReadAllLines … method
- remove all empty lines
- identify same column blocks by checking the split counr result when spliting on delimiter char
- extract the different blocks
- parse the blocks into datatable