public void showReport() { ExcelUnLoad rep = new ExcelUnLoad(); int crow = 1; rep.AddSingleValue("Стоимости договоров по месяцам", crow, 1); crow += 2; foreach (var a in listPay) { DataTable dtData = a.Value; int col = 2; rep.AddSingleValue($"Договор: {a.Key}", crow, 1); foreach (DataRow dr in dtData.Rows) { rep.AddSingleValue(dr["date"].ToString(), crow, col); rep.AddSingleValue(dr["price"].ToString(), crow + 1, col); col++; } crow += 3; } rep.GoToNextSheet("С аннуляциями"); crow = 1; rep.AddSingleValue("Договора с аннуляциями", crow, 1); crow += 2; foreach (var a in listLeave) { rep.AddSingleValue($"Договор id: {a.Key}", crow, 1); int col = 2; foreach (DataRow dr in a.Value.Rows) { rep.AddSingleValue(dr["date"].ToString(), crow, col); rep.AddSingleValue(dr["price"].ToString(), crow + 1, col); col++; } crow += 3; } rep.Show(); }