本文整理了Java中org.apache.poi.xssf.usermodel.XSSFComment.setRow()
方法的一些代码示例,展示了XSSFComment.setRow()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSSFComment.setRow()
方法的具体详情如下:
包路径:org.apache.poi.xssf.usermodel.XSSFComment
类名称:XSSFComment
方法名:setRow
[英]Set the row of the cell that contains the comment If changing both row and column, use #setAddress.
[中]设置包含注释的单元格行如果同时更改行和列,请使用#setAddress。
代码示例来源:origin: org.apache.poi/poi-ooxml
entry.getKey().setRow(entry.getValue());
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
/**
* Assign a cell comment to a cell region in this worksheet
*
* @param cellRef cell region
* @param comment the comment to assign
* @deprecated since Nov 2009 use {@link XSSFCell#setCellComment(org.apache.poi.ss.usermodel.Comment)} instead
*/
@Deprecated
public static void setCellComment(String cellRef, XSSFComment comment) {
CellReference cellReference = new CellReference(cellRef);
comment.setRow(cellReference.getRow());
comment.setColumn(cellReference.getCol());
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
entry.getKey().setRow(entry.getValue());
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
/**
* Creates a comment.
* @param anchor the client anchor describes how this comment is attached
* to the sheet.
* @return the newly created comment.
*/
public XSSFComment createCellComment(ClientAnchor anchor) {
XSSFClientAnchor ca = (XSSFClientAnchor)anchor;
XSSFSheet sheet = (XSSFSheet)getParent();
//create comments and vmlDrawing parts if they don't exist
CommentsTable comments = sheet.getCommentsTable(true);
XSSFVMLDrawing vml = sheet.getVMLDrawing(true);
schemasMicrosoftComVml.CTShape vmlShape = vml.newCommentShape();
if(ca.isSet()){
String position =
ca.getCol1() + ", 0, " + ca.getRow1() + ", 0, " +
ca.getCol2() + ", 0, " + ca.getRow2() + ", 0";
vmlShape.getClientDataArray(0).setAnchorArray(0, position);
}
XSSFComment shape = new XSSFComment(comments, comments.newComment(), vmlShape);
shape.setColumn(ca.getCol1());
shape.setRow(ca.getRow1());
return shape;
}
内容来源于网络,如有侵权,请联系作者删除!