/** * Gets the XSSFCell referenced by the R attribute or creates a new one if cell doesn't exists * @return the referenced XSSFCell, null if the cell reference is invalid */ public XSSFCell getReferencedCell(){ XSSFCell cell = null; CellReference cellReference = new CellReference(singleXmlCell.getR()); XSSFRow row = parent.getXSSFSheet().getRow(cellReference.getRow()); if(row==null){ row = parent.getXSSFSheet().createRow(cellReference.getRow()); } cell = row.getCell(cellReference.getCol()); if(cell==null){ cell = row.createCell(cellReference.getCol()); } return cell; }
final String ref = sc.getR();
/** * Gets the XSSFCell referenced by the R attribute or creates a new one if cell doesn't exists * @return the referenced XSSFCell, null if the cell reference is invalid */ public XSSFCell getReferencedCell(){ XSSFCell cell = null; CellReference cellReference = new CellReference(singleXmlCell.getR()); XSSFRow row = parent.getXSSFSheet().getRow(cellReference.getRow()); if(row==null){ row = parent.getXSSFSheet().createRow(cellReference.getRow()); } cell = row.getCell(cellReference.getCol()); if(cell==null){ cell = row.createCell(cellReference.getCol()); } return cell; }
/** * Gets the XSSFCell referenced by the R attribute or creates a new one if cell doesn't exists * @return the referenced XSSFCell, null if the cell reference is invalid */ public XSSFCell getReferencedCell(){ XSSFCell cell = null; CellReference cellReference = new CellReference(singleXmlCell.getR()); XSSFRow row = parent.getXSSFSheet().getRow(cellReference.getRow()); if(row==null){ row = parent.getXSSFSheet().createRow(cellReference.getRow()); } cell = row.getCell(cellReference.getCol()); if(cell==null){ cell = row.createCell(cellReference.getCol()); } return cell; }