Skip to content

Commit

Permalink
Fixes bug where numeric values in cells would cause an error, when cr…
Browse files Browse the repository at this point in the history
…eating a new row
  • Loading branch information
wow-such-code authored Jul 10, 2023
1 parent 898017e commit bf68406
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ void unlockCellsToRow(Spreadsheet spreadsheet, int maxRow, int column) {

//an unused cell is either null or empty (not blank)
private boolean isCellUnused(Cell cell) {
return cell == null || cell.getStringCellValue().isEmpty();
return cell == null || SpreadsheetMethods.cellToStringOrNull(cell).isEmpty();
}


Expand All @@ -293,7 +293,7 @@ void fixColumnWidth(int colIndex, String colLabel,
if (cell == null) {
this.createCell(0, colIndex, spacingValue);
} else {
oldValue = cell.getStringCellValue();
oldValue = SpreadsheetMethods.cellToStringOrNull(cell);
this.getCell(0, colIndex).setCellValue(spacingValue);
}
//Todo Find out why switching from a sheet with less columns to a sheet with more columns breaks the sheet(e.g. lipidomics to genomics)
Expand Down

0 comments on commit bf68406

Please sign in to comment.