我正在使用ExcelLibrary包。想知道如何确定每张工作表的列数?。
var workbook = Workbook.Load(fileToValidate);
foreach (var v in workbook.Worksheets)
{
//coulmn count for each sheet
}
答案 0 :(得分:1)
尝试
var workbook = Workbook.Load(fileToValidate);
foreach (var v in workbook.Worksheets)
{
//coulmn count for each sheet
int count = v.Columns.Count();
}