7

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

Brendan Gates
  • 103
  • 1
  • 5

2 Answers2

10
SLWorksheetStatistics stats1 = firstdoc.GetWorksheetStatistics();


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

}
bh_earth0
  • 2,537
  • 22
  • 24
0
var stats = sheet.GetWorksheetStatistics(); //sheet::SLDocument
var columnsCount = stats.NumberOfColumns;
var rowsCount = stats.NumberOfRows;
BDL
  • 21,052
  • 22
  • 49
  • 55
Asereware
  • 1,009
  • 6
  • 7