Click here to Skip to main content
15,886,708 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
How is the image height defined for an embedded object? In this case, referencing an Excel workbook embedded in a PowerPoint slide.

Steps to reproduce:
1. Create a new Excel workbook with one column and 38 rows.  Fill the cells with the row number from 1 to 38 just to have data.
2. Set the row height by selecting rows 1 thru 38, right click, select row height, and set to 20 (points).
3. Delete sheets 2 and 3 (not required, but simplifies looking at the XML)
4. Save and close the workbook.
5. Create a new, blank PowerPoint presentation with a single slide.
6. Delete any default objects on the slide.
7. Set the page orientation to portrait.
8. Insert an object from a file, using the workbook created earlier.
9. Save and close the presentation.


I now have a very simple presentation with one slide, that contains a very simple workbook. The height of the embedded workbook is 38 x 20 = 760 points, or 9652000 EMUs. (1 EMU = 12700 points).

However, looking at the XML of the presentation, the image height (imgH attribute) of the OLE Object (oleObj tag), shows 9420034.

In fact, the image height specified in the XML file, always seems to be less than the true height of the data that is seen when we look at the PowerPoint slide.

I cannot figure out why this is so.

Thanks in advance

Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900