简体   繁体   English

如何使用EPPlus在Excel文件(.XLSX)中查找数据范围?

[英]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.

相关问题 如何使用 EPPlus 从 Excel 文件 (xlsx) 中获取/读取图片 - How to get/read picture from Excel file (xlsx) using EPPlus 使用EPPLUS导出excel时,如何根据该值动态设置列数据的前景色? - How do I dynamically set the forecolour of my column data based on the value when exporting excel using EPPLUS? 如何使用C#将.xlsx文件转换为.xlsx,然后使用epplus编辑.xlsx文件,例如为单元格着色 - How do I convert .xls file to .xlsx using c# and then edit the .xlsx file like coloring cells using epplus 使用EPPlus读取Excel文件时,如何从对象访问单个数据? - How do I access the individual data from an object when reading an Excel file using EPPlus? EPPlus:我生成的xlsx文件包含在Excel中对其进行编辑之前不会出现的单元格 - EPPlus: the xlsx file I generate contains cells that do not appear until I edit them in Excel 如何使用 EPPlus 在 excel 文件 (xlsx) 中以像素为单位获取形状/图片坐标 - How to get a shape/picture coordinates in pixels in an excel file (xlsx) using EPPlus 如何使用 EPPLus 库清除 Excel 中的行? - How do i clear rows in Excel using EPPLus library? 如何使用EPPlus将Excel条形图上的数据标签更改为基本内部? - How do I change a data label on an excel bar chart to inside base using EPPlus? EPPlus 打开 excel .xlsx 文件错误 - EPPlus opening excel .xlsx file error 如何使用 epplus 遍历 excel 表中的行? - How do I iterate through rows in an excel table using epplus?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM