Merge doc and xls into a word document

Hi,

I have the following requirement : I have a set of documents (word, excel and potentially images that come from a PDF conversion) and I would like to merge them all in one big document.

That big document will then be transformed in PDF.

I was wondering how to insert an excel document in a word document. I have read around the examples supplied with Java demos. Very very impressive. I have found how to import the images in the document, how to merge multiple word documents but I cannot find how to import an Excel document in a Word document.

Moreover, I would like to understand how to avoir pitfalls of XLS files that can contain too many columns to be inserted in my document or how to insert them as landscape.

Can you help me please ?

Thanks in advance,

Boris

Hi Boris,


Well, Aspose.Cells for Java does not have any built-in feature to convert Excel files to Word documents. The component only supports Excel file formats e.g XLS, XLSX, Tab Delimited, CSV, SpreadsheetML, PDF, Html etc. as the product is spreadsheet manipulation component.

One ways might be, you may take pictures using the feature Worksheet to Image i.e…, insert images of the worksheets using Aspose.Cells API and paste it in word document using Aspose.Words API, not sure if it suit your need.

Alexey from Aspose.Words team, did create a simple converter, so you may try it. See the following thread for downloading the converter (using Aspose.Words and Aspose.Cells products) and for getting complete reference, if you got more queries, do post a query into Aspose.Words forum, they might help you soon:
<a href="


Thank you.



Hi Amjad,

thank you for your answer. The solution with Images would really be in case of technical problem I think.

The first link you have posted is not working. I will try to post in the Word forum though.

Thank you for your quick answer !

Cheers,

Boris

Hi,


I downloaded the utility from other thread (in the first link). I have attached the utility here. Also, I will paste the code segment which Alexey pasted there:

Document doc = new Document(“C:\Temp\sample.doc”);<o:p></o:p>

ConverterDoc2Xls converter = new ConverterDoc2Xls();<o:p></o:p>

Workbook wb = converter.Convert(doc);<o:p></o:p>

wb.save(“C:\Temp\out.xls”);

<o:p> </o:p>

<o:p>Thank you.</o:p>