I have an excel file in which the first row contains the proper headers, and I want to take the first N rows as my actual table, ignoring the rest. I will be using a loop on many excel files doing this same thing, so I am trying to find an efficient way of doing things to avoid possible memory issues
For each excel file in list do the following:
- Read excel file
- remove excess rows from file
- Add to consolidated datatable
This consolidated datatable will then be used within the business process. What is the best way to go about this?
Within each file, row N + 1 contains a blank row, so I was planning on finding N by looking for the first blank row & subtracting 1. However, now that I have the row index, I’m not really sure the best way to get only rows 1 through N in my datatable. Any ideas?