0
我试图在android中将图像写入.doc文件。我搜索了很多,我找不到任何帮助。我有这样一个提示是Apache POI库。我也研究过它,我无法得到任何描述我的问题的方法。我知道如何创建一个文件,这里是代码做到这一点从它的文档在Android Java中使用Apache POI插入图像到.doc文件
import java.io.File;
import java.io.FileOutputStream;
import org.apache.poi.xwpf.usermodel.XWPFDocument;
public class CreateDocument
{
public static void main(String[] args)throws Exception
{
//Blank Document
XWPFDocument document= new XWPFDocument();
//Write the Document in file system
FileOutputStream out = new FileOutputStream(
new File("createdocument.docx"));
document.write(out);
out.close();
}
}
但我怎么可以插入图片到该文件。请帮忙。任何帮助将非常感激。由于
的Apache POI网站,这提供了范例。 http://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/xwpf/usermodel/SimpleImages.java – mkrakhin 2015-04-03 14:12:41