使用 POI 在 xlsx 文件中嵌入文档 [英] Embed document in xlsx file with POI

查看:32
本文介绍了使用 POI 在 xlsx 文件中嵌入文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么方法可以使用 Apache POI 在 xlsx 文件中嵌入文档(例如 pdf)?似乎您可以使用 workbook.getAllEmbedds() 读取嵌入的文档,但我找不到在写入文件时插入任何内容的方法.

Is there any way to embed a document (e.g. pdf) in an xlsx file using Apache POI? It seems you can read embedded documents using workbook.getAllEmbedds(), but I can't find a way to insert any when writing a file.

推荐答案

这应该会有所帮助:类似问题和答案 用户已为 Apache poi 创建了一个补丁,您可以使用该补丁将任意文件包含到 Excel 表中 补丁链接在这里

This should help: similar question with answer User has created a patch for Apache poi with which you can include arbitary file into excel sheet patch link here

希望这会有所帮助.

这篇关于使用 POI 在 xlsx 文件中嵌入文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆