SheetRender class on embedded Ole Object missing some headers

In a C# environment with these nuget packages installed

  <ItemGroup>
    <PackageReference Include="Aspose.Cells" Version="25.3.0" />
    <PackageReference Include="Aspose.Slides.NET" Version="25.3.0" />
    <PackageReference Include="DocumentFormat.OpenXml" Version="3.1.0" />
    <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
  </ItemGroup>

I have a presentation with an embedded Ole Excel Object

xp3.63.zip (217.9 KB)

I am running this code base to grab a PNG image from the object

code.zip (1.6 KB)

If the PowerPoint file is opened, you will see headers on the object like:

ADUSA Corp - Dollar Sales
Valentine Confections
Total Sales of $16.9M

These are a combination of cells we use other data in the spreadsheet to generate an a hard typed “Valentine Confections.”

However, during the sheet render to get the PNG image, these lines are absent. I made sure the print area is correct as the element starts on C14 and ends on F26 and the space is there, but the text is not.

@BK.Broiler.730,

After initial testing, I am able to reproduce the issue as you mentioned by using your sample code snippet and presentation file. I used both Aspose.Cells and Aspose.Slides APIs. I found when running the code segment to grab a PNG image from the OLE object, the header cells are missing.

We require thorough evaluation on why those header cells were missing in the output image. We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSNET-58050

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@BK.Broiler.730 ,

Because the data is in Cell B14, B15, B16, but the printarea starts from column C. We can’t handle the data well in this case.

If you change the printarea from C14:F26 to B14:F26, the data will be output.

@BK.Broiler.730,

There are certain merged cells found in the header section. Please note, when you merge some cells, a single cell (the top left most cell) would be evolved. For example, when B14:G14 cells range is merged, it will become B14 cell. For your case:
Cells B14:G14 → B14
Cells B15:G15 → B15
Cells B16:G16 → B16

Please change the line of code:

sheet.PageSetup.PrintArea = "C14:F26";

to:

sheet.PageSetup.PrintArea = "B14:F26";

it will work fine and the output image will also include the cells in the header as I tested.

I will bring this information back to my team

@BK.Broiler.730
And It’s better that you can change printarea of the template file in Excel for we can not simply know which should be included into print area when coding.