Free Support Forum -

Create a word document with different contents

Good morning,
We are a spanish company and we are working in a proyect when we need .NET components to read and write Office and pdf files. I have seen that you have some products that maybe can help us.
I'm evaluating some of you products, but I have some problems. I think is better that I explain you what we want in my proyect, so that you can answer me if it is possible with your products.
What we want is an application where users can create Word documents where the content comes from other documents: Excel, pdf and images.
For example, I have three documents: one Excel file, one pdf file and one image file. I want to create a Word document with a table of contents with three elements. The content of the first element is the content of the first sheet in the excel file, the content of the second element is the content of the pdf file and the content of the third element is the image.
So, we want to know if it is possible to read the content of one sheet of an excel file and insert that content in a word document. The same for pdf and word files: read its content and insert it into the word document.
Could you please tell me if this is possible with your products?
I will appreciate any kind of example with source code, so that I can demostrate that funcionality.
Thanks in advance.


Thank you for considering Aspose.

Unfortunately, from the formats you have listed, the only thing Aspose.Word is able to insert are images. It cannot import Excel or PDF documents at the moment.

Hello again,

Thank you for your response.

Another question about that. Is it possible to read the content of the excel or pdf file in text mode and insert or copy that text in a word document?

What I have to insert in the word file is the content of the excel or pdf files, so I need to read that content and copy it to the word file.


Sorry I haven't fully understood what "read the content of the excel or pdf file in text mode" means as used here. Both Excel and PDF files are binary files that have their own special structure and Aspose.Word cannot read them at all. Of course, if you find a way to convert these files into plain text or HTML string, it will be possible to insert it into a Word document with Aspose.Word, but at the moment Aspose.Word is unable to do this itself.

Please elaborate your question if you meant something else.

Hello again,

Sorry if you did not understand my question. What I mean is if there is a option to export the content of a excel sheet or pfd file to a format that I can insert into a word file. For example: text, image, xml, html, etc…

For your response, I undestand that there are no options to do this.


Is there a plan to implement this functionality in future? We have tables in Excel files, which we would like to import into Word doc at run time. Any work around?


You can use Aspose.Excel to open Excel files and programmatically go through their contents and use Aspose.Word to also programmatically create corresponding content in a Word file. There is no automatic function for this at the moment, but thanks for the idea, it sounds interesting. I’ll put this onto our possible feature list.