poi怎样读取word中的公式 现在需要使用poi读取word中的各种数据 然后添加到数据库中 主要是做试题管理的系统读取图片已经解决,现在还有一个问题 就是怎样读取word中的公式 例如 U=0V 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 public void extractImagesIntoDirectory(String directory) throws IOException { PicturesTable pTable = msWord.getPicturesTable(); int numCharacterRuns = msWord.getRange().numCharacterRuns(); for (int i = 0; i < numCharacterRuns; i++) { CharacterRun characterRun = msWord.getRange().getCharacterRun(i); if (pTable.hasPicture(characterRun)) { System.out.println("have picture!"); Picture pic = pTable.extractPicture(characterRun, false); String fileName = pic.suggestFullFileName(); OutputStream out = new FileOutputStream(new File(directory + File.separator + fileName)); pic.writeImageContent(out); text = text + "<image src='"+fileName+"'>"; }else{ text = text + characterRun.text(); } } } word中的公式?你确定不是excel中的?? smartupload上传文件重命名问题 struts2标签问题 大家来帮我看看是什么错误 求救:点击图片按钮,在表格中显示内容 谢谢 html 打开一个HMTL文件时,不显示菜单栏,工具栏。 Read timed out 求教,急 这样的图表在网页上用JFREECHART如何画出来. CSDN的朋友们,小弟有一个关系命运前途的问题,希望大家能给给意见!~ 如何查找系统盘里的文件是否存在? 怎样用SQL语句得到查询结果的记录数?100分啊! hibernate中sessionfactory的生命周期是怎样的? 你用哪一个打印控件?
PicturesTable pTable = msWord.getPicturesTable();
int numCharacterRuns = msWord.getRange().numCharacterRuns();
for (int i = 0; i < numCharacterRuns; i++) {
CharacterRun characterRun = msWord.getRange().getCharacterRun(i);
if (pTable.hasPicture(characterRun)) {
System.out.println("have picture!");
Picture pic = pTable.extractPicture(characterRun, false);
String fileName = pic.suggestFullFileName();
OutputStream out = new FileOutputStream(new File(directory
+ File.separator + fileName));
pic.writeImageContent(out);
text = text + "<image src='"+fileName+"'>";
}else{
text = text + characterRun.text();
}
}
}
你确定不是excel中的??