C#EPPlus OpenXML计数行 [英] C# EPPlus OpenXML count rows

查看:281
本文介绍了C#EPPlus OpenXML计数行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用EPPlus和OpenXML有没有人知道如何计数行的语法?



说我的工作表被称为工作表



int numberRows = worksheet.rows.count()?或 worksheet.rows.dimension



我对答案有兴趣,但如何找到答案很酷,像去定义,寻找这个或那个等。

解决方案

使用一个名为工作表',worksheet.Dimension.Start.Row和worksheet.Dimension.End.Row应该提供您需要的信息。



worksheet.Dimension.Address将给你一个包含传统Excel范围格式的工作表尺寸的字符串(例如,行1-5,列1-9的A1:I5)。



有一个文档文件可用。在很多情况下,与图书馆一起玩,可以找到答案。 EPPlus似乎设计得很好 - 一切似乎都是逻辑上命名的,至少是

With EPPlus and OpenXML does anyone know the syntax on how to count the rows?

Say my worksheet is called "worksheet"

int numberRows = worksheet.rows.count()? or worksheet.rows.dimension

I'm certainly interested in the answer, but how to find the answer would be cool to, like "Go to definition" and look for this or that, etc.

解决方案

With a worksheet object called 'worksheet', worksheet.Dimension.Start.Row and worksheet.Dimension.End.Row should give you the information you need.

worksheet.Dimension.Address will give you a string containing the worksheet dimensions in the traditional Excel range format (e.g. 'A1:I5' for rows 1-5, columns 1-9).

There is a documentation file available. In many cases it might be just as quick to play around with the library and find the answer that way. EPPlus seems to be well designed - everything seems to be logically named, at least.

这篇关于C#EPPlus OpenXML计数行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆