Arianule
Arianule

Reputation: 9063

getting column count per work sheet Excell Library

I am using the ExcelLibrary package. Was wondering how to determine the amount of columns per work sheet?.

var workbook = Workbook.Load(fileToValidate);
foreach (var v in workbook.Worksheets)
{
     //coulmn count for each sheet

}

Upvotes: 0

Views: 132

Answers (1)

Plue
Plue

Reputation: 1790

Try

var workbook = Workbook.Load(fileToValidate);
foreach (var v in workbook.Worksheets)
{
     //coulmn count for each sheet
     int count = v.Columns.Count();

}

Upvotes: 1

Related Questions