/// <summary> /// Prints legend of the depertments by side of the schedule for a room. /// </summary> /// <param name="sheet">A Microsoft Excel sheet.</param> private void printLegend(ISheet sheet) { CellReference cellReference = new CellReference("J5"); int rowIndex = cellReference.Row; int cellIndex = cellReference.Col; Dictionary <string, short> subjectColorMap = Template.GetSubjectColorMap(); foreach (var entry in subjectColorMap) { IRow row = sheet.GetRow(rowIndex); ICell cell = row.GetCell(cellIndex); cell.CellStyle = Template.GetCellStyle(_workbook, (string)entry.Key); cell.SetCellValue((string)entry.Key); rowIndex++; } }
private void printLegend(ISheet sheet) { CellReference cellReference = new CellReference("J5"); int rowIndex = cellReference.Row; int cellIndex = cellReference.Col; OrderedDictionary subjectColorMap = ClassScheduleTemplate.GetSubjectColorMap(); foreach (DictionaryEntry entry in subjectColorMap) { IRow row = sheet.GetRow(rowIndex); ICell cell = row.GetCell(cellIndex); cell.CellStyle = ClassScheduleTemplate.GetCellStyle(_workbook, (short)entry.Value); cell.SetCellValue((string)entry.Key); rowIndex++; } }