/// <summary> /// Create IUS Sheet /// </summary> /// <param name="excelFile">Excel File</param> internal override void GenerateSheet(ref DIExcel excelFile) { // -- Create Timeperiod Sheet int sheetNo = this.CreateSheet(ref excelFile, this.ColumnHeader[DSRColumnsHeader.IUS]); DataTable Table = null; // -- sheet content excelFile.SetCellValue(sheetNo, Constants.HeaderRowIndex, Constants.HeaderColIndex, ColumnHeader[DSRColumnsHeader.IUS]); excelFile.GetCellFont(sheetNo, Constants.HeaderRowIndex, Constants.HeaderColIndex).Size = Constants.SheetsLayout.HeaderFontSize; excelFile.SetCellValue(sheetNo, Constants.Sheet.IUS.IUSDetailsRowIndex, Constants.Sheet.SummaryReport.IUSColValueIndex, ColumnHeader[DSRColumnsHeader.IUS]); excelFile.SetCellValue(sheetNo, Constants.Sheet.IUS.IUSDetailsRowIndex, Constants.Sheet.SummaryReport.IUSColValueIndex, ColumnHeader[DSRColumnsHeader.GLOBAL]); Table = this.GetIUSTable(); excelFile.LoadDataTableIntoSheet(Constants.Sheet.IUS.IUSDetailsRowIndex, Constants.HeaderColIndex, Table, sheetNo, false); int LastRow = Constants.Sheet.IUS.IUSDetailsRowIndex + Table.Rows.Count; // -- Apply Font Settings this.ApplyFontSettings(ref excelFile, sheetNo, Constants.Sheet.IUS.IUSDetailsRowIndex, Constants.HeaderColIndex, LastRow, Constants.Sheet.IUS.IUSLastColIndex, true); // -- Set Column Width excelFile.SetColumnWidth(sheetNo, Constants.SheetsLayout.HeaderNameColWidth, Constants.Sheet.IUS.IUSDetailsRowIndex, Constants.Sheet.IUS.IUSNameColIndex, LastRow, Constants.Sheet.IUS.IUSNameColIndex); excelFile.AutoFitColumns(sheetNo, Constants.Sheet.IUS.IUSDetailsRowIndex, Constants.Sheet.IUS.IUSCountColINdex, LastRow, Constants.Sheet.IUS.IUSLastColIndex); // -- Wrap Text of Indicator Column excelFile.WrapText(sheetNo, Constants.Sheet.IUS.IUSDetailsRowIndex, Constants.Sheet.IUS.IUSNameColIndex, LastRow, Constants.Sheet.IUS.IUSNameColIndex, true); // -- Set Cell Borders excelFile.SetCellBorder(Constants.Sheet.IUS.IUSDetailsRowIndex, Constants.HeaderColIndex, SpreadsheetGear.LineStyle.Continous, SpreadsheetGear.BorderWeight.Medium, Color.Black); }
/// <summary> /// Create IUS NOT Linked TO Classification Sheet /// </summary> /// <param name="excelFile">Excel File</param> internal override void GenerateSheet(ref DIExcel excelFile) { int sheetNo = this.CreateSheet(ref excelFile, DILanguage.GetLanguageString("IUS_MISSING_CLASSIFICATION")); DataTable Table = null; // -- sheet content excelFile.SetCellValue(sheetNo, Constants.HeaderRowIndex, Constants.HeaderColIndex, DILanguage.GetLanguageString("IUS_MISSING_CLASSIFICATION")); excelFile.GetCellFont(sheetNo, Constants.HeaderRowIndex, Constants.HeaderColIndex).Size = Constants.SheetsLayout.HeaderFontSize; // -- Get IUSLinked Data TAble. Table = this.GetIUSMissingICTable(); excelFile.LoadDataTableIntoSheet(Constants.Sheet.IUSLinkedTOIC.IUSLinkedDetailsRowIndex, Constants.HeaderColIndex, Table, sheetNo, false); int LastRow = Constants.Sheet.IUSLinkedTOIC.IUSLinkedDetailsRowIndex + Table.Rows.Count; // -- Apply Font Settings this.ApplyFontSettings(ref excelFile, sheetNo, Constants.Sheet.IUSLinkedTOIC.IUSLinkedDetailsRowIndex, Constants.HeaderColIndex, LastRow, Constants.Sheet.IUSLinkedTOIC.IUSLinkedLastColIndex, true); // -- Set Column Width excelFile.SetColumnWidth(sheetNo, Constants.SheetsLayout.HeaderNameColWidth, Constants.Sheet.IUSLinkedTOIC.IUSLinkedNameColIndex, Constants.Sheet.IUSLinkedTOIC.IUSLinkedNameColIndex, LastRow, Constants.Sheet.IUSLinkedTOIC.IUSLinkedNameColIndex); // -- autofit Map excelFile.AutoFitColumns(sheetNo, Constants.Sheet.IUSLinkedTOIC.IUSLinkedDetailsRowIndex, Constants.Sheet.IUSLinkedTOIC.IUSLinkedLastColIndex, LastRow, Constants.Sheet.IUSLinkedTOIC.IUSLinkedLastColIndex); // -- Wrap Text of Indicator Column excelFile.WrapText(sheetNo, Constants.HeaderRowIndex, Constants.Sheet.IUSLinkedTOIC.IUSLinkedNameColIndex, LastRow, Constants.Sheet.IUSLinkedTOIC.IUSLinkedNameColIndex, true); // -- Set Cell Borders excelFile.SetCellBorder(Constants.Sheet.IUSLinkedTOIC.IUSLinkedDetailsRowIndex, Constants.HeaderColIndex, SpreadsheetGear.LineStyle.Continous, SpreadsheetGear.BorderWeight.Thin, Color.Black); }
/// <summary> /// Set Line Borders of Cells /// </summary> /// <param name="excelFile">Excel File Oblect</param> /// <param name="sheetNo">Sheet No</param> /// <param name="startRow">Starting Row Index</param> /// <param name="startCol">Starting Column Index</param> /// <param name="lastCol">Last Column Index</param> protected void SetCellsBorder(ref DIExcel excelFile, int sheetNo, int startRow, int startCol, int lastCol) { //-- Set Border Line for (int i = startCol; i <= lastCol; i++) { excelFile.SetCellBorder(sheetNo, startRow, i, SpreadsheetGear.LineStyle.Continous, SpreadsheetGear.BorderWeight.Thin, Color.Black, SpreadsheetGear.BordersIndex.EdgeTop); excelFile.SetCellBorder(sheetNo, startRow, i, SpreadsheetGear.LineStyle.Continous, SpreadsheetGear.BorderWeight.Thin, Color.Black, SpreadsheetGear.BordersIndex.EdgeBottom); excelFile.SetCellBorder(sheetNo, startRow, i, SpreadsheetGear.LineStyle.Continous, SpreadsheetGear.BorderWeight.Thin, Color.Black, SpreadsheetGear.BordersIndex.EdgeLeft); excelFile.SetCellBorder(sheetNo, startRow, i, SpreadsheetGear.LineStyle.Continous, SpreadsheetGear.BorderWeight.Thin, Color.Black, SpreadsheetGear.BordersIndex.EdgeRight); excelFile.SetCellBorder(sheetNo, startRow, i, SpreadsheetGear.LineStyle.Continous, SpreadsheetGear.BorderWeight.Thin, Color.Black, SpreadsheetGear.BordersIndex.InsideHorizontal); excelFile.SetCellBorder(sheetNo, startRow, i, SpreadsheetGear.LineStyle.Continous, SpreadsheetGear.BorderWeight.Thin, Color.Black, SpreadsheetGear.BordersIndex.InsideVertical); } }
/// <summary> /// Set Line Borders of Sheet /// </summary> private void SetSheetBorder(ref DIExcel RangeCheckSheet, int SheetNo) { //-- Set Border Line RangeCheckSheet.SetCellBorder(SheetNo, RangeCheckFileRowsInfo.SheetStartRowIndex, RangeCheckFileRowsInfo.SheetHeaderColIndex, SpreadsheetGear.LineStyle.Continuous, SpreadsheetGear.BorderWeight.Medium, Color.Black, SpreadsheetGear.BordersIndex.EdgeTop); RangeCheckSheet.SetCellBorder(SheetNo, RangeCheckFileRowsInfo.SheetStartRowIndex, RangeCheckFileRowsInfo.SheetHeaderColIndex, SpreadsheetGear.LineStyle.Continuous, SpreadsheetGear.BorderWeight.Medium, Color.Black, SpreadsheetGear.BordersIndex.EdgeBottom); RangeCheckSheet.SetCellBorder(SheetNo, RangeCheckFileRowsInfo.SheetStartRowIndex, RangeCheckFileRowsInfo.SheetHeaderColIndex, SpreadsheetGear.LineStyle.Continuous, SpreadsheetGear.BorderWeight.Medium, Color.Black, SpreadsheetGear.BordersIndex.EdgeLeft); RangeCheckSheet.SetCellBorder(SheetNo, RangeCheckFileRowsInfo.SheetStartRowIndex, RangeCheckFileRowsInfo.SheetHeaderColIndex, SpreadsheetGear.LineStyle.Continuous, SpreadsheetGear.BorderWeight.Medium, Color.Black, SpreadsheetGear.BordersIndex.InsideHorizontal); RangeCheckSheet.SetCellBorder(SheetNo, RangeCheckFileRowsInfo.SheetStartRowIndex, RangeCheckFileRowsInfo.SheetHeaderColIndex, SpreadsheetGear.LineStyle.Continuous, SpreadsheetGear.BorderWeight.Medium, Color.Black, SpreadsheetGear.BordersIndex.InsideVertical); }