private Tables CreateHeads(DateTime startYears, DateTime endYearsa, out int colNum) { var table = new Tables(); table.AddHeadCol("供应商代码", "min-width: 125px;"); table.AddHeadCol("供应商名称", "min-width: 160px;"); table.AddHeadCol("原材料代码", "min-width: 130px;"); table.AddHeadCol("原材料名称", "min-width: 135px;"); table.AddHeadCol("价格单位", "min-width: 135px;"); colNum = 4; while (startYears <= endYearsa) { table.AddHeadCol($"{startYears.ToString("yyyy-MM")}", "min-width: 85px;"); startYears = startYears.AddMonths(1); colNum++; } table.AddHeadRow(); return(table); }