Skip to content
This repository has been archived by the owner on Oct 27, 2021. It is now read-only.

使用itextpdf转换excel,先用poi生成excel到本地,excel无法转换pdf,生成全部都是空格 #15

Open
1828581413 opened this issue Nov 1, 2019 · 3 comments

Comments

@1828581413
Copy link

使用itextpdf转换excel,先用poi生成excel到本地,excel无法转换pdf,生成全部都是空格,然后打开本地的excel,ctrl+s保存,重新转换为pdf,转换成功。两种情况eclipse都未报任何错误,实在不知道哪里错了?难道是excel编码格式?

@1828581413
Copy link
Author

经过测试,需要注释掉一行代码
// 执行此方法在poi导出为 Workbook 是 SXSSFWorkbook的类型时,此方法会导致转换cell 为""
//cell.setCellType(CellType.STRING);

@caryyu
Copy link
Owner

caryyu commented Nov 11, 2019

能否把问题描述的更清楚一些?比如可以把输入测试的文件上传一下,然后描述你想要达到的预期效果。

@FirstComputer123
Copy link

漂亮兄弟,我看了你的办法,解决了

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants