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

Free Support Forum - aspose.com

Creating docx format documents

Hi,
I am not sure if this has been asked before, but can we use the aspose product to produce docx(Microsoft Open Office XML Format, MS office 2007) format documents?

regards,
Jaideep.

Hi

Thanks for your interest in Aspose.Words. Yes, Aspose.Words supports DOCX format. Please see the following link for more information.

http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/file-formats-and-conversions.html

Best regards.

Hi,
Thanks for the reply alexey.
I do read that aspose supports the DOCX format.
We have licensed version of aspose.words, could you point to me to documentation or examples as to how i can go about loading, generating, saving and converting DOCX documents.

regards,
Jaideep.

Hi

Thanks for your inquiry. You can open DOCX file using the following code.

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

To save document in DOCX format you should use the following code.

doc.Save("out.docx", SaveFormat.Docx);

Best regards.

Thanks for the reply alexey.
Two questions, one - if i am creating a word document, is this the only change i need to do?
instead of new document(“test.doc”) i list the extension as new document(“test.docx”), the remaining procedure of building the word document remains the same ?

Also, if i have created a .doc or .xls document how do i convert it to the 2007 format using aspose ?

please let me know,
regards
Jaideep.

Hi

1. Yes, procedure of building the word document remains the same.

2. You can convert DOC file to DOCX using the following simple code.

Document doc = new Document("in.doc");

doc.Save("out.docx", SaveFormat.Docx);

If you would like to convert XLS files to DOC then the following demo could be useful for you.

http://www.aspose.com/community/files/51/aspose.words/entry112559.aspx

Best regards.

Alexey,
Thanks for all the prompt replies.

I understood the converting from .doc to .docx part. The second part of my question was a way to convert .xls to Office 2007 compatible excel files and not word files.
Is there a conversion method for excel too ?

regards,
Jaideep.

Hi

I think that you should ask this question in the Aspose.Cells forum. They will answer you shortly.

http://www.aspose.com/community/forums/aspose.cells-for-.net-java-and-reporting-services/19/showforum.aspx

Best regards.

Hi,

Is .docx document loading supported in Java?
I tried the trial version of Aspose words but getting the following exception when loading a .docx file.

com.aspose.words.UnsupportedFileFormatException: docx
at com.aspose.words.Document.a(Unknown Source)
at com.aspose.words.Document.(Unknown Source)
at com.aspose.words.Document.(Unknown Source)

My code is,



Document doc = new Document(“sample.docx”);

doc.save(“out.html”, SaveFormat.HTML);


Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your interest in Aspose.Words for java. Currently Aspose.Words for java supports DOCX export only. Import of DOCX document will be implemented later (hopefully within few months).

Best regards.

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. At the moment we are working hard to implement completely new porting technology. With this technology we will be able to porting all Aspose.Words for .Net functionality to the Java release (including DOCX). And all subsequent Aspose.Words for Java releases will be synchronized with .Net ones. We hope to complete this work this year. It is the best estimate I could give.

Best regards.