- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.apache.poi.xslf.usermodel.XSLFSheet.addRelation()
方法的一些代码示例,展示了XSLFSheet.addRelation()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSLFSheet.addRelation()
方法的具体详情如下:
包路径:org.apache.poi.xslf.usermodel.XSLFSheet
类名称:XSLFSheet
方法名:addRelation
暂无
代码示例来源:origin: org.apache.poi/poi-ooxml
@Override
public XSLFPictureShape createPicture(PictureData pictureData){
if (!(pictureData instanceof XSLFPictureData)) {
throw new IllegalArgumentException("pictureData needs to be of type XSLFPictureData");
}
RelationPart rp = addRelation(null, XSLFRelation.IMAGES, (XSLFPictureData)pictureData);
XSLFPictureShape sh = getDrawing().createPicture(rp.getRelationship().getId());
new DrawPictureShape(sh).resize();
getShapes().add(sh);
sh.setParent(this);
return sh;
}
代码示例来源:origin: org.apache.poi/poi-ooxml
@Override
public XSLFPictureShape createPicture(PictureData pictureData){
if (!(pictureData instanceof XSLFPictureData)) {
throw new IllegalArgumentException("pictureData needs to be of type XSLFPictureData");
}
RelationPart rp = getSheet().addRelation(null, XSLFRelation.IMAGES, (XSLFPictureData)pictureData);
XSLFPictureShape sh = getDrawing().createPicture(rp.getRelationship().getId());
new DrawPictureShape(sh).resize();
_shapes.add(sh);
sh.setParent(this);
return sh;
}
代码示例来源:origin: org.apache.poi/poi-ooxml
@Override
public XSLFObjectShape createOleShape(PictureData pictureData) {
if (!(pictureData instanceof XSLFPictureData)) {
throw new IllegalArgumentException("pictureData needs to be of type XSLFPictureData");
}
RelationPart rp = addRelation(null, XSLFRelation.IMAGES, (XSLFPictureData)pictureData);
XSLFObjectShape sh = getDrawing().createOleShape(rp.getRelationship().getId());
CTOleObject oleObj = sh.getCTOleObject();
Dimension dim = pictureData.getImageDimension();
oleObj.setImgW(Units.toEMU(dim.getWidth()));
oleObj.setImgH(Units.toEMU(dim.getHeight()));
getShapes().add(sh);
sh.setParent(this);
return sh;
}
代码示例来源:origin: org.apache.poi/poi-ooxml
@Override
public XSLFObjectShape createOleShape(PictureData pictureData) {
if (!(pictureData instanceof XSLFPictureData)) {
throw new IllegalArgumentException("pictureData needs to be of type XSLFPictureData");
}
RelationPart rp = getSheet().addRelation(null, XSLFRelation.IMAGES, (XSLFPictureData)pictureData);
XSLFObjectShape sh = getDrawing().createOleShape(rp.getRelationship().getId());
CTOleObject oleObj = sh.getCTOleObject();
Dimension dim = pictureData.getImageDimension();
oleObj.setImgW(Units.toEMU(dim.getWidth()));
oleObj.setImgH(Units.toEMU(dim.getHeight()));
getShapes().add(sh);
sh.setParent(this);
return sh;
}
代码示例来源:origin: org.apache.poi/poi-ooxml
@Override
public void linkToSlide(Slide<XSLFShape,XSLFTextParagraph> slide) {
if (_link.isSetId() && !_link.getId().isEmpty()) {
_sheet.getPackagePart().removeRelationship(_link.getId());
}
RelationPart rp = _sheet.addRelation(null, XSLFRelation.SLIDE, (XSLFSheet) slide);
_link.setId(rp.getRelationship().getId());
_link.setAction("ppaction://hlinksldjump");
}
代码示例来源:origin: org.apache.poi/poi-ooxml
RelationPart rp = _sheet.addRelation(null, XSLFRelation.SLIDE, pp);
_link.setId(rp.getRelationship().getId());
_link.setAction(src._link.getAction());
代码示例来源:origin: org.apache.poi/poi-ooxml
/**
* Import a picture data from another document.
*
* @param blipId ID of the package relationship to retrieve.
* @param parent parent document containing the data to import
* @return ID of the created relationship
*/
String importBlip(String blipId, POIXMLDocumentPart parent) {
final XSLFPictureData parData = parent.getRelationPartById(blipId).getDocumentPart();
final XSLFPictureData pictureData;
if (getPackagePart().getPackage() == parent.getPackagePart().getPackage()) {
// handle ref counter correct, if the parent document is the same as this
pictureData = parData;
} else {
XMLSlideShow ppt = getSlideShow();
pictureData = ppt.addPicture(parData.getData(), parData.getType());
}
RelationPart rp = addRelation(blipId, XSLFRelation.IMAGES, pictureData);
return rp.getRelationship().getId();
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
@Override
public XSLFPictureShape createPicture(PictureData pictureData){
if (!(pictureData instanceof XSLFPictureData)) {
throw new IllegalArgumentException("pictureData needs to be of type XSLFPictureData");
}
RelationPart rp = addRelation(null, XSLFRelation.IMAGES, (XSLFPictureData)pictureData);
XSLFPictureShape sh = getDrawing().createPicture(rp.getRelationship().getId());
new DrawPictureShape(sh).resize();
getShapes().add(sh);
sh.setParent(this);
return sh;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
@Override
public XSLFPictureShape createPicture(PictureData pictureData){
if (!(pictureData instanceof XSLFPictureData)) {
throw new IllegalArgumentException("pictureData needs to be of type XSLFPictureData");
}
RelationPart rp = getSheet().addRelation(null, XSLFRelation.IMAGES, (XSLFPictureData)pictureData);
XSLFPictureShape sh = getDrawing().createPicture(rp.getRelationship().getId());
new DrawPictureShape(sh).resize();
_shapes.add(sh);
sh.setParent(this);
return sh;
}
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
public XSLFPictureShape createPicture(int pictureIndex){
List<PackagePart> pics = getPackagePart().getPackage()
.getPartsByName(Pattern.compile("/ppt/media/image" + (pictureIndex + 1) + ".*?"));
if(pics.size() == 0) {
throw new IllegalArgumentException("Picture with index=" + pictureIndex + " was not found");
}
PackagePart pic = pics.get(0);
PackageRelationship rel = getPackagePart().addRelationship(
pic.getPartName(), TargetMode.INTERNAL, XSLFRelation.IMAGES.getRelation());
addRelation(rel.getId(), new XSLFPictureData(pic, rel));
XSLFPictureShape sh = getDrawing().createPicture(rel.getId());
sh.resize();
getShapeList().add(sh);
return sh;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
@Override
public XSLFObjectShape createOleShape(PictureData pictureData) {
if (!(pictureData instanceof XSLFPictureData)) {
throw new IllegalArgumentException("pictureData needs to be of type XSLFPictureData");
}
RelationPart rp = addRelation(null, XSLFRelation.IMAGES, (XSLFPictureData)pictureData);
XSLFObjectShape sh = getDrawing().createOleShape(rp.getRelationship().getId());
CTOleObject oleObj = sh.getCTOleObject();
Dimension dim = pictureData.getImageDimension();
oleObj.setImgW(Units.toEMU(dim.getWidth()));
oleObj.setImgH(Units.toEMU(dim.getHeight()));
getShapes().add(sh);
sh.setParent(this);
return sh;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
@Override
public XSLFObjectShape createOleShape(PictureData pictureData) {
if (!(pictureData instanceof XSLFPictureData)) {
throw new IllegalArgumentException("pictureData needs to be of type XSLFPictureData");
}
RelationPart rp = getSheet().addRelation(null, XSLFRelation.IMAGES, (XSLFPictureData)pictureData);
XSLFObjectShape sh = getDrawing().createOleShape(rp.getRelationship().getId());
CTOleObject oleObj = sh.getCTOleObject();
Dimension dim = pictureData.getImageDimension();
oleObj.setImgW(Units.toEMU(dim.getWidth()));
oleObj.setImgH(Units.toEMU(dim.getHeight()));
getShapes().add(sh);
sh.setParent(this);
return sh;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
@Override
public void linkToSlide(Slide<XSLFShape,XSLFTextParagraph> slide) {
if (_link.isSetId() && !_link.getId().isEmpty()) {
_sheet.getPackagePart().removeRelationship(_link.getId());
}
RelationPart rp = _sheet.addRelation(null, XSLFRelation.SLIDE, (XSLFSheet) slide);
_link.setId(rp.getRelationship().getId());
_link.setAction("ppaction://hlinksldjump");
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
RelationPart rp = _sheet.addRelation(null, XSLFRelation.SLIDE, pp);
_link.setId(rp.getRelationship().getId());
_link.setAction(src._link.getAction());
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
/**
* Import a picture data from another document.
*
* @param blipId ID of the package relationship to retrieve.
* @param parent parent document containing the data to import
* @return ID of the created relationship
*/
String importBlip(String blipId, POIXMLDocumentPart parent) {
final XSLFPictureData parData = parent.getRelationPartById(blipId).getDocumentPart();
final XSLFPictureData pictureData;
if (getPackagePart().getPackage() == parent.getPackagePart().getPackage()) {
// handle ref counter correct, if the parent document is the same as this
pictureData = parData;
} else {
XMLSlideShow ppt = getSlideShow();
pictureData = ppt.addPicture(parData.getData(), parData.getType());
}
RelationPart rp = addRelation(blipId, XSLFRelation.IMAGES, pictureData);
return rp.getRelationship().getId();
}
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
/**
* Import a picture data from another document.
*
* @param blipId ID of the package relationship to retrieve.
* @param packagePart package part containing the data to import
* @return ID of the created relationship
*/
String importBlip(String blipId, PackagePart packagePart) {
PackageRelationship blipRel = packagePart.getRelationship(blipId);
PackagePart blipPart;
try {
blipPart = packagePart.getRelatedPart(blipRel);
} catch (InvalidFormatException e){
throw new POIXMLException(e);
}
XSLFPictureData data = new XSLFPictureData(blipPart, null);
XMLSlideShow ppt = getSlideShow();
int pictureIdx = ppt.addPicture(data.getData(), data.getPictureType());
PackagePart pic = ppt.getAllPictures().get(pictureIdx).getPackagePart();
PackageRelationship rel = getPackagePart().addRelationship(
pic.getPartName(), TargetMode.INTERNAL, blipRel.getRelationshipType());
addRelation(rel.getId(), new XSLFPictureData(pic, rel));
return rel.getId();
}
}
我正在编写 java 代码来读取列名为“键”和“值”的 excel 文件。但是由于无法在这行代码中进行转换而出错, Row firstRow =(Row)sheet.getRow(0); 如何解决这个
在我使用 jasperreports-3.7.4 jar 以 Excel 格式下载 Jasper Reports 之前。现在我正在尝试升级到 jasperreports-6.3.1 jar。但它在调用
我在将报告导出为 XLS 时遇到了一些问题。导出为 PDF 效果很好。 所以我尝试更新到最新的 JasperReports 和 Apache POI 版本: JasperReports:5.5.0 兴
同一模型的其他函数工作正常,我只有其中两个有问题,它们都与数据库交互。在本地工作。 来自错误日志。 PHP fatal error :调用未定义的方法 UserModel::getScreens()
是否有可能在 django UserModel 的管理页面中创建自定义操作?我想自动将用户添加到组中(比如将他添加到员工中,设置一些额外的值等),当然还要创建操作来收回这些更改。 感谢您的帮助。 最佳
我想在包中输入提示用户模型。默认情况下,它是 App\User .在 channel 类(class)中,这没问题: class ChannelExample { public functio
这是我的代码: var user = UserModel.findOne({ _id: decodedToken.id, }, function (err, user) {
当我尝试在 Users 上使用 MongooseModel 时,出现以下错误 Nest can't resolve dependencies of the UserModel (?). Please
我对 Nodejs 和 mongoDB 还很陌生。我已经创建了注册和用户架构,但它无法识别this并发送以下错误: ReferenceError: userModel is not defined 当
我想使用 npoi 在 VS2012/2010 中操作 .xlsx 文件。为此,我应该导入 NPOI.XSSF.UserModel,但是当我添加 npoi.dll 并尝试导入它时,没有 XSSF 使用
本文整理了Java中org.apache.poi.xwpf.usermodel.XWPFHeaderFooter类的一些代码示例,展示了XWPFHeaderFooter类的具体用法。这些代码示例主要来
本文整理了Java中org.apache.poi.xssf.usermodel.XSSFHyperlink类的一些代码示例,展示了XSSFHyperlink类的具体用法。这些代码示例主要来源于Gith
本文整理了Java中org.apache.poi.xslf.usermodel.XSLFSlideLayout类的一些代码示例,展示了XSLFSlideLayout类的具体用法。这些代码示例主要来源于
本文整理了Java中org.apache.poi.xwpf.usermodel.XWPFStyle类的一些代码示例,展示了XWPFStyle类的具体用法。这些代码示例主要来源于Github/Stack
本文整理了Java中org.apache.poi.xwpf.usermodel.XWPFRelation类的一些代码示例,展示了XWPFRelation类的具体用法。这些代码示例主要来源于Github
本文整理了Java中org.apache.poi.xslf.usermodel.XSLFTextParagraph类的一些代码示例,展示了XSLFTextParagraph类的具体用法。这些代码示例主
本文整理了Java中org.apache.poi.xslf.usermodel.XSLFTextRun类的一些代码示例,展示了XSLFTextRun类的具体用法。这些代码示例主要来源于Github/S
本文整理了Java中org.apache.poi.xslf.usermodel.XSLFSlideMaster类的一些代码示例,展示了XSLFSlideMaster类的具体用法。这些代码示例主要来源于
本文整理了Java中org.apache.poi.xssf.usermodel.XSSFComment类的一些代码示例,展示了XSSFComment类的具体用法。这些代码示例主要来源于Github/S
本文整理了Java中org.apache.poi.xslf.usermodel.XSLFTableCell类的一些代码示例,展示了XSLFTableCell类的具体用法。这些代码示例主要来源于Gith
我是一名优秀的程序员,十分优秀!