private void printBlockPass(int indexRow, int indexCol, Nwuram.Framework.ToExcelNew.ExcelUnLoad rep, string nameShort, string fio, string code) { int rowStart = indexRow; //Размеры колонок //rep.SetBorders(indexRow, indexCol, indexRow+8, indexCol+4); rep.SetColumnWidth(indexRow, indexCol, indexRow, indexCol, 15); rep.SetColumnWidth(indexRow, indexCol + 1, indexRow, indexCol, 8); rep.SetColumnWidth(indexRow, indexCol + 2, indexRow, indexCol + 2, 10); rep.SetColumnWidth(indexRow, indexCol + 3, indexRow, indexCol + 3, 5); rep.SetColumnWidth(indexRow, indexCol + 4, indexRow, indexCol + 4, 12); //Начало rep.Merge(indexRow, indexCol, indexRow, indexCol + 1); rep.SetFontName(indexRow, indexCol, indexRow, indexCol + 1, "Times New Roman"); rep.AddSingleValue("Пропуск", indexRow, indexCol); rep.SetFontSize(indexRow, indexCol, indexRow, indexCol, 16); rep.SetCellAlignmentToLeft(indexRow, indexCol, indexRow, indexCol); rep.SetCellAlignmentToJustify(indexRow, indexCol, indexRow, indexCol); rep.SetFontBold(indexRow, indexCol, indexRow, indexCol); //+2 колонки rep.Merge(indexRow, indexCol + 2, indexRow, indexCol + 3); rep.SetFontName(indexRow, indexCol + 2, indexRow, indexCol + 3, "Times New Roman"); rep.AddSingleValue("часы работы", indexRow, indexCol + 2); rep.SetFontSize(indexRow, indexCol + 2, indexRow, indexCol + 3, 12); rep.SetCellAlignmentToLeft(indexRow, indexCol + 2, indexRow, indexCol + 3); rep.SetCellAlignmentToJustify(indexRow, indexCol + 2, indexRow, indexCol + 3); rep.SetFontBold(indexRow, indexCol + 2, indexRow, indexCol + 3); //Колонка +4 rep.SetFontName(indexRow, indexCol + 4, indexRow, indexCol + 4, "Code EAN13"); rep.Merge(indexRow, indexCol + 4, indexRow + 8, indexCol + 4); rep.SetOrientation(indexRow, indexCol + 4, indexRow, indexCol + 4, 90); rep.SetFontSize(indexRow, indexCol + 4, indexRow, indexCol + 4, 41); rep.AddSingleValue(ConvertToNewEan(code), indexRow, indexCol + 4); rep.SetCellAlignmentToLeft(indexRow, indexCol + 4, indexRow, indexCol + 4); rep.SetCellAlignmentToJustify(indexRow, indexCol + 4, indexRow, indexCol + 4); //Вторая строка indexRow++; rep.Merge(indexRow, indexCol, indexRow, indexCol + 1); rep.SetFontName(indexRow, indexCol, indexRow, indexCol + 1, "Times New Roman"); rep.AddSingleValue("на служебную парковку", indexRow, indexCol); rep.SetFontSize(indexRow, indexCol, indexRow, indexCol, 12); rep.SetCellAlignmentToLeft(indexRow, indexCol, indexRow, indexCol); rep.SetCellAlignmentToJustify(indexRow, indexCol, indexRow, indexCol); //rep.SetFontBold(indexRow, indexCol, indexRow, indexCol); //+2 колонки rep.Merge(indexRow, indexCol + 2, indexRow, indexCol + 3); rep.SetFontName(indexRow, indexCol + 2, indexRow, indexCol + 3, "Times New Roman"); rep.AddSingleValue("с 7:30 до 2:30", indexRow, indexCol + 2); rep.SetFontSize(indexRow, indexCol + 2, indexRow, indexCol + 3, 12); rep.SetCellAlignmentToLeft(indexRow, indexCol + 2, indexRow, indexCol + 3); rep.SetCellAlignmentToJustify(indexRow, indexCol + 2, indexRow, indexCol + 3); rep.SetFontBold(indexRow, indexCol + 2, indexRow, indexCol + 3); //3 и 4 строка indexRow++; indexRow++; rep.Merge(indexRow, indexCol, indexRow, indexCol + 3); rep.SetFontName(indexRow, indexCol, indexRow, indexCol + 1, "Times New Roman"); rep.AddSingleValue(fio, indexRow, indexCol); rep.SetFontSize(indexRow, indexCol, indexRow, indexCol, 12); rep.SetCellAlignmentToCenter(indexRow, indexCol, indexRow, indexCol); rep.SetCellAlignmentToJustify(indexRow, indexCol, indexRow, indexCol); rep.SetFontBold(indexRow, indexCol, indexRow, indexCol); //5 строка indexRow++; rep.Merge(indexRow, indexCol, indexRow, indexCol + 3); rep.SetFontName(indexRow, indexCol, indexRow, indexCol + 1, "Times New Roman"); rep.AddSingleValue("(Фамилия И.О.)", indexRow, indexCol); rep.SetFontSize(indexRow, indexCol, indexRow, indexCol, 9); rep.SetCellAlignmentToCenter(indexRow, indexCol, indexRow, indexCol); rep.SetCellAlignmentToTop(indexRow, indexCol, indexRow, indexCol); //rep.SetFontBold(indexRow, indexCol, indexRow, indexCol); //6 и 7 и 8 строка indexRow++; indexRow++; //rep.Merge(indexRow, indexCol, indexRow, indexCol); rep.SetFontName(indexRow, indexCol, indexRow, indexCol + 1, "Times New Roman"); rep.AddSingleValue("Гос. Номер а/м:", indexRow, indexCol); rep.SetFontSize(indexRow, indexCol, indexRow, indexCol, 11); rep.SetCellAlignmentToLeft(indexRow, indexCol, indexRow, indexCol); rep.SetCellAlignmentToJustify(indexRow, indexCol, indexRow, indexCol); //rep.SetFontBold(indexRow, indexCol, indexRow, indexCol); rep.Merge(indexRow, indexCol + 1, indexRow + 1, indexCol + 3); rep.SetWrapText(indexRow, indexCol + 1, indexRow + 1, indexCol + 3); rep.SetFontName(indexRow, indexCol + 1, indexRow, indexCol + 3, "Times New Roman"); rep.AddSingleValue(nameShort, indexRow, indexCol + 1); rep.SetFontSize(indexRow, indexCol + 1, indexRow, indexCol + 3, 12); rep.SetCellAlignmentToCenter(indexRow, indexCol + 1, indexRow, indexCol + 3); rep.SetCellAlignmentToJustify(indexRow, indexCol + 1, indexRow, indexCol + 3); rep.SetFontBold(indexRow, indexCol + 1, indexRow, indexCol + 3); //9 строка indexRow++; indexRow++; rep.Merge(indexRow, indexCol, indexRow, indexCol + 3); rep.SetFontName(indexRow, indexCol, indexRow, indexCol + 3, "Times New Roman"); rep.AddSingleValue("Подпись РДО ___________", indexRow, indexCol); rep.SetFontSize(indexRow, indexCol, indexRow, indexCol, 11); rep.SetCellAlignmentToLeft(indexRow, indexCol, indexRow, indexCol); rep.SetCellAlignmentToJustify(indexRow, indexCol, indexRow, indexCol); rep.SetBordersToAll(rowStart, indexCol, rowStart, indexCol + 4, OfficeOpenXml.Style.ExcelBorderStyle.Medium, 1); rep.SetBordersToAll(indexRow, indexCol, indexRow, indexCol + 4, OfficeOpenXml.Style.ExcelBorderStyle.Medium, 2); rep.SetBordersToAll(rowStart, indexCol, indexRow, indexCol, OfficeOpenXml.Style.ExcelBorderStyle.Medium, 3); rep.SetBordersToAll(rowStart, indexCol + 4, indexRow, indexCol + 4, OfficeOpenXml.Style.ExcelBorderStyle.Medium, 4); rep.SetBordersToAll(rowStart, indexCol + 3, indexRow, indexCol + 3, OfficeOpenXml.Style.ExcelBorderStyle.Medium, 4); }