/** * Returns the sheet this cell belongs to * * @return the sheet this cell belongs to */ @Override public XSSFSheet getSheet() { return getRow().getSheet(); }
f.setStringValue(formula); if(f.getT() == STCellFormulaType.SHARED){ getRow().getSheet().onReadCell(this);
/** * The purpose of this method is to validate the cell state prior to modification * * @see #notifyArrayFormulaChanging() */ void notifyArrayFormulaChanging(String msg){ if(isPartOfArrayFormulaGroup()){ CellRangeAddress cra = getArrayFormulaRange(); if(cra.getNumberOfCells() > 1) { throw new IllegalStateException(msg); } //un-register the single-cell array formula from the parent XSSFSheet getRow().getSheet().removeArrayFormula(this); } }
f.setStringValue(formula); if(f.getT() == STCellFormulaType.SHARED){ getRow().getSheet().onReadCell(this);
/** * Returns the sheet this cell belongs to * * @return the sheet this cell belongs to */ @Override public XSSFSheet getSheet() { return getRow().getSheet(); }
/** * Returns the sheet this cell belongs to * * @return the sheet this cell belongs to */ public XSSFSheet getSheet() { return getRow().getSheet(); }
/** * The purpose of this method is to validate the cell state prior to modification * * @see #notifyArrayFormulaChanging() */ void notifyArrayFormulaChanging(String msg){ if(isPartOfArrayFormulaGroup()){ CellRangeAddress cra = getArrayFormulaRange(); if(cra.getNumberOfCells() > 1) { throw new IllegalStateException(msg); } //un-register the single-cell array formula from the parent XSSFSheet getRow().getSheet().removeArrayFormula(this); } }
/** * The purpose of this method is to validate the cell state prior to modification * * @see #notifyArrayFormulaChanging() */ void notifyArrayFormulaChanging(String msg){ if(isPartOfArrayFormulaGroup()){ CellRangeAddress cra = getArrayFormulaRange(); if(cra.getNumberOfCells() > 1) { throw new IllegalStateException(msg); } //un-register the single-cell array formula from the parent XSSFSheet getRow().getSheet().removeArrayFormula(this); } }
private PdfCellNode createCell(XSSFSheet xssfSheet, XSSFCell cell, XLSXExpression expr) { return isTableDataRow(cell.getRow().getRowNum()) ? componentFactory.createTableCell(xssfSheet, cell, expr) : componentFactory.createCell(xssfSheet, cell, expr); }
private void setStyle(XSSFCell cell, PdfCellNode cellNode) { if (isTableHeader(cell.getRow().getRowNum())) { cellNode.setStylingComponent(new TableHeaderStyle()); } else { cellNode.setStylingComponent(new TableStyle()); } }
public static void hyperlinkScreenshot(XSSFCell cell, String FileAddress){ XSSFWorkbook wb=cell.getRow().getSheet().getWorkbook(); CreationHelper createHelper = wb.getCreationHelper(); CellStyle hlink_style = wb.createCellStyle(); Font hlink_font = wb.createFont(); hlink_font.setUnderline(Font.U_SINGLE); hlink_font.setColor(IndexedColors.BLUE.getIndex()); hlink_style.setFont(hlink_font); Hyperlink hp = createHelper.createHyperlink(Hyperlink.LINK_FILE); FileAddress=FileAddress.replace("\\", "/"); hp.setAddress(FileAddress); cell.setHyperlink(hp); cell.setCellStyle(hlink_style); }