We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Regarding Export as ODT File Name issue

Hello ,
I am using latest version of Aspose.word for converting a docx file to odt file. The odt file is generated using the name i have given in code but on opening the odt file it is having the name as ‘untitled document’ and not the name that I have given in code.

Here is my Snippet :

doc.save(outStream, saveopts);
byte[] result = getArrayFromStream(outStream);

	FileUtil.write("C:/Users/logeswaran-7565/Desktop/USER DOC TESTING OUTPUT/ODT Export Test.odt", result);		

Kindly help me at the earliest.


Thanks for your inquiry. Your query is more related to Java API. You can use following code example to save the document using OutputStream. Hope this helps you.

Document doc = new Document(MyDir + "in.docx");

OutputStream out = new FileOutputStream(MyDir + "output.odt");
doc.save(out, SaveFormat.ODT);