@Override public void cell(String cellRef, String formattedValue, XSSFComment comment) { if (firstCellOfRow) { firstCellOfRow = false; } else { output.append('\t'); } if (formattedValue != null) { checkMaxTextSize(output, formattedValue); output.append(formattedValue); } if (includeCellComments && comment != null) { String commentText = comment.getString().getString().replace('\n', ' '); output.append(formattedValue != null ? " Comment by " : "Comment by "); checkMaxTextSize(output, commentText); if (commentText.startsWith(comment.getAuthor() + ": ")) { output.append(commentText); } else { output.append(comment.getAuthor()).append(": ").append(commentText); } } }
public void cell(String cellRef, String formattedValue, XSSFComment comment) { try { // Handle any missing cells int colNum = (new CellReference(cellRef)).getCol(); for (int cn=lastSeenCol+1; cn<colNum; cn++) { xhtml.startElement("td"); xhtml.endElement("td"); } lastSeenCol = colNum; // Start this cell xhtml.startElement("td"); // Main cell contents if (formattedValue != null) { xhtml.characters(formattedValue); } // Comments if (comment != null) { xhtml.startElement("br"); xhtml.endElement("br"); xhtml.characters(comment.getAuthor()); xhtml.characters(": "); xhtml.characters(comment.getString().getString()); } xhtml.endElement("td"); } catch (SAXException e) { } }
@Override public void cell(String cellRef, String formattedValue, XSSFComment comment) { if (firstCellOfRow) { firstCellOfRow = false; } else { output.append('\t'); } if (formattedValue != null) { checkMaxTextSize(output, formattedValue); output.append(formattedValue); } if (includeCellComments && comment != null) { String commentText = comment.getString().getString().replace('\n', ' '); output.append(formattedValue != null ? " Comment by " : "Comment by "); checkMaxTextSize(output, commentText); if (commentText.startsWith(comment.getAuthor() + ": ")) { output.append(commentText); } else { output.append(comment.getAuthor()).append(": ").append(commentText); } } }
public void cell(String cellRef, String formattedValue, XSSFComment comment) { try { xhtml.startElement("td"); // Main cell contents if (formattedValue != null) { xhtml.characters(formattedValue); } // Comments if (comment != null) { xhtml.startElement("br"); xhtml.endElement("br"); xhtml.characters(comment.getAuthor()); xhtml.characters(": "); xhtml.characters(comment.getString().getString()); } xhtml.endElement("td"); } catch (SAXException e) { } }
public void cell(String cellRef, String formattedValue, XSSFComment comment) { try { // Handle any missing cells int colNum = (new CellReference(cellRef)).getCol(); for (int cn=lastSeenCol+1; cn<colNum; cn++) { xhtml.startElement("td"); xhtml.endElement("td"); } lastSeenCol = colNum; // Start this cell xhtml.startElement("td"); // Main cell contents if (formattedValue != null) { xhtml.characters(formattedValue); } // Comments if (comment != null) { xhtml.startElement("br"); xhtml.endElement("br"); xhtml.characters(comment.getAuthor()); xhtml.characters(": "); xhtml.characters(comment.getString().getString()); } xhtml.endElement("td"); } catch (SAXException e) { } }