问题 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