使用SpreadsheetLight进行行计数

Bre*_*tes 5 c# excel visual-studio spreadsheetlight

我正在寻找一个类似于DataTable.Rows.Count的函数,它可以与SLDocument一起使用,以找出有多少行包含数据.SpreadsheetLight中有可用的东西吗?实现这一目标的任何其他方法?

-Brendan

bh_*_*th0 8

SLWorksheetStatistics stats1 = firstdoc.GetWorksheetStatistics();


for (int j = 1; j < stats1.EndRowIndex; j++)
{
    var value = firstdoc.GetCellValueAsString(0, j)  ;

}
Run Code Online (Sandbox Code Playgroud)