使用aspose.words生成docx文档,文档中插入ole对象,xls、xlsx、doc、docx、ppt、pptx,对生成的文档解包,发现xlsx、docx、pptx变成了bin文件,但是用office嵌入就不会改变格式,请问是aspose不支持还是什么原因?
File folder = new File("D:\\desktop\\");
File out = new File(folder, "doc.docx");
File test1 = new File(folder, "test1.xls");
File test2 = new File(folder, "test2.xlsx");
File test3 = new File(folder, "test3.doc");
File test4 = new File(folder, "test4.docx");
File test5 = new File(folder, "test5.ppt");
File test6 = new File(folder, "test6.pptx");
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.insertOleObject(test1.getAbsolutePath(), false, true, null);
builder.insertOleObject(test2.getAbsolutePath(), false, true, null);
builder.insertOleObject(test3.getAbsolutePath(), false, true, null);
builder.insertOleObject(test4.getAbsolutePath(), false, true, null);
builder.insertOleObject(test5.getAbsolutePath(), false, true, null);
builder.insertOleObject(test6.getAbsolutePath(), false, true, null);
doc.save(out.getAbsolutePath());