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

Free Support Forum - aspose.com

DxaOriginal and DyaOriginal values are lost of embedded excel document

Hi Team,

We are embedding excel document in word using OpenXML + Aspose.

We are embedding excel through program by using OpenXML and
generated document is loaded in Aspose to process further.

But when I load word document containing embedded excel the values of Dxa and Dya Original are lost in Aspose. This is causing the shrink behavior of embedded excel in word.

Could you please investigate this issue.

Please find sample attached document to load which has Dxa and DyaOriginal values initialized from OpenXML.

AsposeOpenXMLEmbedXLS.txt contains the final code we are using.

The embedExcel.zip contains the demo for embedding excel using OpenXML.

Please let me know if you need any details.

Thanks and Regards,


Thanks for your request. Do you mean that the embedded Excel sheet is shrank when you double click on it? If so, as I can see when you do the same with your generated document (Without Aspose.Words) you will see the same behavior. So I do not think Aspose.Words does something incorrectly.

dxaOrig and dyaOrig are standing for storing original image size if the image itself does not contain this information. In your case the image is PNG, this format do contain information about image size, so dxaOrig and dyaOrig are not required.

Best regards,

Thanks Alexey,

I am in talk with MSFT for embedding excel using OpenXML. And we are Aspose for loading after embedding excel .

They have given me solution to set this values to preserve the image size in office 2010.

Note:Sorry for the earlier reply …(If you might have got notification).

Thanks and Regards,

Hi Alexey,

Excel sheet is not shrinking in our case.

If we shrink and excel and then we embed in word, it is returning to original position after double click on image,

For that purpose we have to set the values of dxa and dya originals to retain the shape of image.

Could you please let me know how to preserve this values while loading?



Thanks for your request. Please see the attached document. To produce this document, I opened document generated by your program, double clicked on the embedded Excel and saved the document. As you can see Excel sheet is shrank. The same occurs if I open/save the document using Aspose.Words and repeat actions disrobed above.

Please let me know if I am doing something wrong to check the issue.

Best regards.