private int GenerateHellHorizontal(int rowIndex, ISheet sheet) { var row13 = sheet.CreateRow(rowIndex); row13.CreateCell(0).SetCellValue("overzicht Horizontaal"); rowIndex++; rowIndex++; var list = _calc.CalculateSunRayOnHorizontalSpot(); int col_hoogte_zon = 2; var uur = sheet.CreateRow(rowIndex); uur.CreateCell(0).SetCellValue("uur"); uur.CreateCell(1).SetCellValue("uur"); rowIndex++; var QdirH = sheet.CreateRow(rowIndex); QdirH.CreateCell(0).SetCellValue("QdirH"); rowIndex++; QdirH.CreateCell(1).SetCellValue("graden"); var QhemH = sheet.CreateRow(rowIndex); QhemH.CreateCell(0).SetCellValue("QhemH"); rowIndex++; QhemH.CreateCell(1).SetCellValue("graden"); foreach (var data in list) { uur.CreateCell(col_hoogte_zon).SetCellValue(data.Item1); QdirH.CreateCell(col_hoogte_zon).SetCellValue(data.Item2); QhemH.CreateCell(col_hoogte_zon).SetCellValue(data.Item3); col_hoogte_zon++; } return(rowIndex); }
public static string FormatSunRayHorizontal(TotalSunHeat data) { var sb = new StringBuilder(); var sbHour = new StringBuilder(); var sbVal = new StringBuilder(); var sbVal2 = new StringBuilder(); var listData = data.CalculateSunRayOnHorizontalSpot(); sbHour.AppendFormat("|{0,13}|", "uur"); sbVal.AppendFormat("|{0,13}|", "QdirH"); sbVal2.AppendFormat("|{0,13}|", "QhemH"); sb.AppendLine(">>Overzicht zonnestraling op horizontaal vlak: "); foreach (var dat in listData) { sbHour.AppendFormat("|{0,8}|", +dat.Item1); sbVal.AppendFormat("|{0,8:N2}|", dat.Item2); sbVal2.AppendFormat("|{0,8:N2}|", dat.Item3); } sb.AppendLine(sbHour.ToString()); sb.AppendLine(sbVal.ToString()); sb.AppendLine(sbVal2.ToString()); sb.Append("\n"); return(sb.ToString()); }