diff --git a/Schnittstelle/Export/Excel.cs b/Schnittstelle/Export/Excel.cs index 0f3561d..c96f0f6 100644 --- a/Schnittstelle/Export/Excel.cs +++ b/Schnittstelle/Export/Excel.cs @@ -76,8 +76,8 @@ namespace Schnittstelle.Export row++; worksheet.Range[row, 1].Text = haltung.Stammdaten.Objektbezeichnung; - worksheet.Range[row, 2].Text = "TODO"; // Länge - worksheet.Range[row, 3].Text = "TODO"; // Tiefe + worksheet.Range[row, 2].Text = haltung.Stammdaten.Kante.Laenge.ToString(); // Länge + worksheet.Range[row, 3].Text = "Not Implemented yet"; // Tiefe worksheet.Range[row, 5].Text = haltung.Inspektionsdaten.Lage.Strassename; worksheet.Range[row, 9].Text = haltung.Inspektionsdaten.OptischeInspektion[0].Rohrleitung.Grunddaten.Profilbreite.ToString(); @@ -103,13 +103,17 @@ namespace Schnittstelle.Export worksheet.Range[row, 10].Text = "Kosten"; worksheet.Range[row, 1, row,10].CellStyle=headerStyle; - + + //08950738 + row++; int temprow = row; int codestart_row = row; //int rows = 7; decimal inspizierteLaenge = 0m; - for (int j = 0; j < haltung.Inspektionsdaten.OptischeInspektion.Count; j++) + //if(haltung.Stammdaten.Objektbezeichnung.Equals("08950738")) Debugger.Break(); + int anzahlInspektionen = haltung.Inspektionsdaten.OptischeInspektion.Count-1; + for (int j = 0; j < anzahlInspektionen+1; j++) { OptischeInspektion opt = haltung.Inspektionsdaten.OptischeInspektion[j]; inspizierteLaenge += opt.Rohrleitung.Zustaende.Max(x => x.Station); @@ -149,6 +153,7 @@ namespace Schnittstelle.Export row++; } } + row += anzahlInspektionen; worksheet.Range[temprow, 1, row-1, 10].CellStyle = cellStyle; worksheet.Range[row-1, 1, row-1, 10].CellStyle = kodierungEnde; temprow = row; @@ -197,6 +202,7 @@ namespace Schnittstelle.Export row += 5; } worksheet.UsedRange.AutofitColumns(); + worksheet.Range[string.Format("J1:J{0}",row)].NumberFormat = "€#,##0.00"; } } }