Given an Excel spreadsheet, how do I find the extents of the data? Is there a method I can call or a property I can check? Do I need to check cell-by-cell for nulls and then row-by-row? There's gotta be an easier way, right?
I just downloaded the EPPlus library this morning so I might be overlooking something basic. I also checked the sample project but didn't see anything related to this question in it.
Thanks!
EPPlus does not work with the XLS format. Only XLSX. You'll need to find a new library.
Using the Excel Object Model, you'd use Worksheet.UsedRange for that.
Using EPPlus, you'd use WorkSheet.Dimensions.Start.Row / End.Row / Start.Column / End.Column.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With