1
0
Fork 0

Compare commits

..

2 Commits

Author SHA1 Message Date
Emelie Schneider 1014ff515f final 2024-01-11 10:44:48 +01:00
Emelie Schneider ee5de23dea final 2024-01-11 10:43:27 +01:00
2 changed files with 18 additions and 2 deletions

View File

@ -36,7 +36,6 @@ public class Axel {
spr.put("C1", "8");
spr.put("C2", "2");
//
System.out.println(spr);
@ -54,10 +53,11 @@ public class Axel {
System.out.println("Do you want to load a csv File?(y/n)");
readInput=sc.nextLine();
if(readInput.equals("y")||readInput.equals("Y")) {
System.out.println("Paste the filpath here:");
System.out.println("Paste the filepath here:");
readInput= sc.nextLine();
path=readInput;
spr.readCsv(path, ",", "A1");
System.out.println(spr);
}

View File

@ -136,6 +136,10 @@ public class Spreadsheet {
}
/**
@ -622,6 +626,18 @@ public class Spreadsheet {
return endCell;
}
public void clearTable() {
int rows = cells.length;
int cols = cells[0].length;
for (int r = 0; r < rows; r++) {
for (int c = 0; c < cols; c++) {
cells[r][c].setValue("");
cells[r][c].setFormula("");
}
}
}
}