private void FormatFinalReportSheet(Excel.Worksheet sheet) { //Insert a row to set the title ExcelUtilies.InsertRow(sheet, "A1"); sheet.Cells[1, 1] = sheet.Name; //insert two rows, total excel start with Row 3 ExcelUtilies.InsertRow(sheet, "A1"); this.SetBackgroundColor(sheet); this.CalculateRententionRate(sheet); string endColumn = ExcelUtilies.ExcelColumnIndexToName(ExcelUtilies.ExcelColumnNameToIndex(FunnelMonthlyReportParameters.MonthEnd)); string startColumn = this.GetCurrentMonthExcelColumn(); if (ExcelUtilies.ExcelColumnNameToIndex(startColumn) <= ExcelUtilies.ExcelColumnNameToIndex(endColumn)) { ExcelUtilies.DeleteColumns(sheet, startColumn, endColumn); } //for Europe remove the values of Spot Rate and KFR Rate if (sheet.Name == "Europe" || sheet.Name == "Mexico+US") { int endMonthColumn = ExcelUtilies.ExcelColumnNameToIndex(this.GetCurrentMonthExcelColumn()); for (int i = 2; i < endMonthColumn; i++) { //Spot Rate sheet.Cells[4, i] = string.Empty; //KFR Rate sheet.Cells[5, i] = string.Empty; } } this.FormatCells(sheet); this.FreezePanes(sheet); }