How to find extents of my data in an Excel file (.XLSX) using EPPlus?

Given an Excel spreadsheet, how do I find data extents? Is there a way that I can name, or a property that I can check? Do I need to check a cell against cells for zeros, and then take turns? There should be an easier way, right?

I just downloaded the EPPlus library this morning so that I can forget something basic. I also checked a sample project, but did not see anything related to this issue.

Thanks!

+6
c # excel visual-studio-2010 epplus
source share
1 answer

Using the Excel object model, you should use Worksheet.UsedRange .

Using EPPlus, you should use WorkSheet.Dimensions.Start.Row / End.Row / Start.Column / End.Column.

+16
source share

All Articles