Row count with SpreadsheetLight

一曲冷凌霜 提交于 2019-12-07 05:13:29

问题


I'm looking for a function similar to DataTable.Rows.Count that can be used with an SLDocument to find out how many rows have data in them. Is there something available in SpreadsheetLight? Any other methods of achieving this?

-Brendan


回答1:


SLWorksheetStatistics stats1 = firstdoc.GetWorksheetStatistics();


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

}


来源:https://stackoverflow.com/questions/31325827/row-count-with-spreadsheetlight

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!