Following on this post that comes close to answer my question, I need some help in settings up FileHelpers. I have bank statements with some extra info above the actual transaction data, thus the file looks like below:
Some Header 1,Some Header 2,And Header 3
<summary of the entire file on 5 lines>
Date,Transaction Type,Description,Amount,Running Balance
<actual transaction data, on 5 columns each line>
I am interested in capturing all the fields (in a DataTable), including the summary. Basically, I would like the datatable to be sized according to the max number of columns in any line.
Prasanth has suggested an alternative, but I don't understand what _fileContent
is:
using (MemoryStream stream = new MemoryStream(_fileContent)) //file content can be file as byte array
I have written code in VBA for years and have recently started an Excel Com-AddIn in c#, so I am more of a novice I guess.
Thank you in advance! Dani