public void writeResult(int startRow, PrettyResult prettyResult, OutputTheme theme) { for (int i = 0; i < prettyResult.resultTable.GetLength(0); i++) { for (int j = 0; j < prettyResult.resultTable.GetLength(1); j++) { PrettyResultCell prettyCell = prettyResult.resultTable[i, j]; if (prettyCell != null) { workSheet.SetCellValue(startRow + i, j, prettyCell.value); workSheet.GetCellAt(startRow + i, j).Style.SetBackgroundColor(theme.getColor(prettyResult.resultTable[i, j].type)); } } } wb.SaveAs(filePath); }
public static void Main(string[] args) { IProblemInput problemInput; ITransportProblem problemResolver; problemInput = getProblemInput(); problemResolver = getProblemResolver(); var problemTable = problemInput.getProblemTable(); var result = problemResolver.calculate(problemTable).toPrettyResult(); OutputTheme outputTheme = getOutputTheme(); ExcelDataOutput output = new IronExcelDataOutput("/home/kocmuk/Downloads/output.xlsx"); output.writeResult(0, result, outputTheme); }
internal static void PrintUpgradeWarning() { ColoredConsole.WriteLine(OutputTheme.ErrorColor("You are using an outdated version of the Azure Functions Core Tools. For more information, please see: https://aka.ms/func-v2-upgrade")); }