From 098299b45e88d428dd8b5c3130e27ea2c629821c Mon Sep 17 00:00:00 2001 From: "s.eser" Date: Tue, 9 Jan 2024 14:16:10 +0100 Subject: [PATCH] Comment added. --- Axel/resources/zahlen.csv | 4 ++-- .../de/hs_mannheim/informatik/spreadsheet/Spreadsheet.java | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Axel/resources/zahlen.csv b/Axel/resources/zahlen.csv index bc73f82..b5d059d 100644 --- a/Axel/resources/zahlen.csv +++ b/Axel/resources/zahlen.csv @@ -4,7 +4,7 @@ ,,=STABW(A1.B10),,,,,,, ,=SUMME(A1.A3),=MIN(A1.B10),,,,,,, ,,=MAX(A1.B10),,,,,,, -,,,,,,,,, -,,,,,,,,, +=15+2,,,,,,,,, +=A1+4,,=MITTELWERT(A1.A10),,,,,,, ,,,,,,,,, ,=32,,,,,,,, diff --git a/Axel/src/de/hs_mannheim/informatik/spreadsheet/Spreadsheet.java b/Axel/src/de/hs_mannheim/informatik/spreadsheet/Spreadsheet.java index a669471..f274997 100644 --- a/Axel/src/de/hs_mannheim/informatik/spreadsheet/Spreadsheet.java +++ b/Axel/src/de/hs_mannheim/informatik/spreadsheet/Spreadsheet.java @@ -243,6 +243,8 @@ public class Spreadsheet { cells[row][col].setValue(""); } + //If comma number available show max 2 digits after decimal point + if(!cells[row][col].getFormula().isEmpty()) if(String.format("%.2f",result).substring(String.format("%.2f",result).length()-2).charAt(0)=='0'&& String.format("%.2f",result).substring(String.format("%.2f",result).length()-2).charAt(1)=='0')