[英]How do I find the extents of my data in an Excel file (.XLSX) using EPPlus?
Given an Excel spreadsheet, how do I find the extents of the data? 给定Excel电子表格,如何查找数据范围? 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. 我今天早上刚刚下载了EPPlus库,所以我可能会忽略一些基本的东西。 I also checked the sample project but didn't see anything related to this question in it. 我还检查了示例项目,但没有看到与此问题相关的任何内容。
Thanks! 谢谢!
Using the Excel Object Model, you'd use Worksheet.UsedRange for that. 使用Excel对象模型,您可以使用Worksheet.UsedRange 。
Using EPPlus, you'd use WorkSheet.Dimensions.Start.Row / End.Row / Start.Column / End.Column. 使用EPPlus,您将使用WorkSheet.Dimensions.Start.Row / End.Row / Start.Column / End.Column。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.