Aspose.Slides - Require Height & Width / Top & Left of IPortion Components


We have a requirement to embed Excel cells range into PPT slides for a business use case. So we have used a temporary Aspose.Total license.

We have tried an approach of converting Excel data into an image & tried placing it in the PPT over a particular placeholder text.

Example of a placeholder: {{1.SheetDetails}}

When we try placing the image, we look for available height & width for placing the image. We are expecting these values in IPortion’s PortionFormat property to place the image correctly.
Values expected:

  • top & left of a particular IPortion (or)
  • outer height & outer width of every IPortions

Here’s some information that you might need:

  • OS version on which the code was executed: Windows 10
  • .NET target platform in the app: Am currently trying this on .NET Framework 6
  • I used Aspose.Total (23.6.0)

Attaching a sample PPT file for your reference: (210.8 KB)


It looks like Excel range to image rendering part via Aspose.Cells is ok and you need assistance regarding placements of the output images at particular locations into the slides. Additionally you want to get top/left values, outer height and width of certain portions via Aspose.Slides. So, I am moving your thread to respective forum where one of our colleagues from Aspose.Slides team will assist you soon. In the meanwhile please do provide your current sample code, input PowerPoint and other resource files that you are using. This will help to evaluate your issue precisely on our end and devise a solution for your reference.

The IPortion interface has the GetRect method that provides values of the position and size of the text portion. I hope this method will help you. If the issue persists, please explain why you were unable to use it for your purposes.

@andrey.potapov This solution worked for us. Thanks for helping us out!

-Nivedhitha R

We are glad to know that the issue has been resolved on your end. Thank you for using Aspose.Slides.