1
0
Fork 0
main
Emelie Schneider 2024-01-11 10:43:27 +01:00
parent 4419f6e872
commit ee5de23dea
2 changed files with 19 additions and 1 deletions

View File

@ -54,10 +54,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,11 @@ public class Spreadsheet {
}
/**
@ -622,6 +627,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("");
}
}
}
}