private void removeCell(HSSFCell cell, boolean alsoRemoveRecords) { int column=cell.getColumnIndex(); if(column < 0) { throw new RuntimeException("Negative cell indexes not allowed"); } if(column >= cells.length || cell != cells[column]) { throw new RuntimeException("Specified cell is not from this row"); } if(cell.isPartOfArrayFormulaGroup()){ cell.notifyArrayFormulaChanging(); } cells[column]=null; if(alsoRemoveRecords) { CellValueRecordInterface cval = cell.getCellValueRecord(); sheet.getSheet().removeValueRecord(getRowNum(), cval); } if (cell.getColumnIndex()+1 == row.getLastCol()) { row.setLastCol(calculateNewLastCellPlusOne(row.getLastCol())); } if (cell.getColumnIndex() == row.getFirstCol()) { row.setFirstCol(calculateNewFirstCell(row.getFirstCol())); } }
private void removeCell(HSSFCell cell, boolean alsoRemoveRecords) { int column=cell.getColumnIndex(); if(column < 0) { throw new RuntimeException("Negative cell indexes not allowed"); } if(column >= cells.length || cell != cells[column]) { throw new RuntimeException("Specified cell is not from this row"); } if(cell.isPartOfArrayFormulaGroup()){ cell.notifyArrayFormulaChanging(); } cells[column]=null; if(alsoRemoveRecords) { CellValueRecordInterface cval = cell.getCellValueRecord(); sheet.getSheet().removeValueRecord(getRowNum(), cval); } if (cell.getColumnIndex()+1 == row.getLastCol()) { row.setLastCol(calculateNewLastCellPlusOne(row.getLastCol())); } if (cell.getColumnIndex() == row.getFirstCol()) { row.setFirstCol(calculateNewFirstCell(row.getFirstCol())); } }
private void removeCell(HSSFCell cell, boolean alsoRemoveRecords) { int column=cell.getColumnIndex(); if(column < 0) { throw new RuntimeException("Negative cell indexes not allowed"); } if(column >= cells.length || cell != cells[column]) { throw new RuntimeException("Specified cell is not from this row"); } if(cell.isPartOfArrayFormulaGroup()){ cell.notifyArrayFormulaChanging(); } cells[column]=null; if(alsoRemoveRecords) { CellValueRecordInterface cval = cell.getCellValueRecord(); sheet.getSheet().removeValueRecord(getRowNum(), cval); } if (cell.getColumnIndex()+1 == row.getLastCol()) { row.setLastCol(calculateNewLastCellPlusOne(row.getLastCol())); } if (cell.getColumnIndex() == row.getFirstCol()) { row.setFirstCol(calculateNewFirstCell(row.getFirstCol())); } }
private void removeCell(HSSFCell cell, boolean alsoRemoveRecords) { int column=cell.getColumnIndex(); if(column < 0) { throw new RuntimeException("Negative cell indexes not allowed"); } if(column >= cells.length || cell != cells[column]) { throw new RuntimeException("Specified cell is not from this row"); } if(cell.isPartOfArrayFormulaGroup()){ cell.notifyArrayFormulaChanging(); } cells[column]=null; if(alsoRemoveRecords) { CellValueRecordInterface cval = cell.getCellValueRecord(); sheet.getSheet().removeValueRecord(getRowNum(), cval); } if (cell.getColumnIndex()+1 == row.getLastCol()) { row.setLastCol(calculateNewLastCellPlusOne(row.getLastCol())); } if (cell.getColumnIndex() == row.getFirstCol()) { row.setFirstCol(calculateNewFirstCell(row.getFirstCol())); } }