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

Free Support Forum - aspose.com

Embedded worksheet resizing

Hi,
We currently use Aspose.Slides to sometimes embed a Aspose.Cells.Worksheet on a Slide. The worksheet has formatted cells with number formats applied to many cells.

On double clicking the picture (OleObjectFrame) on the slide we see the Worksheet object behind , however, the worksheet always resizes into about half the size of the object frame. I can see that the font of the contents in the cells is also appearing considerable reduced. The number of rows visible in the worksheet remains constant.

Attached is a sample of a presentation with one such slide. Could you help us understand why this could be happening ? Is there something to do with the fact that we format the worksheet cells?
In cases where I am not applying as many formats we dont see this resizing behaviour.

I also tried setting the worksheet as the active worksheet.

This is how we create the objectFrame and insert the workbook.

byte[] b = GetStream(workbook);
OleObjectFrame oof = slide.Shapes.AddOleObjectFrame(x, y, width, height, “Excel.Sheet.8”, b);
Aspose.Slides.Picture pic = new Aspose.Slides.Picture(slide.Parent, chartBitMap);
int picID = slide.Parent.Pictures.Add(pic);
oof.PictureId = picID;

Attached is one such presentation where the issue is visible.

Thanks
Sirish

Hello Sirish,

Please check this thread for detailed C#, VB and Java code examples which create Excel OLE object on a slide.

https://forum.aspose.com/t/97938

Also please read about Workbook.SetOleSize(…) method in the Aspose.Cells documentation.

Hi Alexey,

Thanks for the link. However , that is how we are creating the OleObjectFrame. Were you able to notice the embedded excel resizing in the attached presentation ? I had set the OleSize to 20 rows and the sheet does have 20 rows even AFTER resizing.

The problem was that the size of the rows seem to have shrunk for some reason and the excel sheet was about half the size of the OleObjectFrame

Sirish

Hi,
Another observation is that the number of rows remains constant as per what i have set in the line below:
workbook.Worksheets.SetOleSize(0, 20, 0, 7);

The font properties show the normal font size , font type etc

This lead me to believe that the worksheet Zoom factor is being reduced when Excel is being embedded into a Slide as an OleObjectFrame. I chatted with the Aspose.cells support and they were of the opinion that it is an Aspose.slides issue.

Please let me know how I can overcome this issue as this is a Show stopper behavior for us.

Sirish


Hi Sirish,

This issue is under investigation and we will inform you if it is possible to resolve the issue.

Hi,

Are there any updates on this issue ? I am attaching a solution where you can reproduce the issue. If it is indeed an issue can you atleast suggest a work around ? As right now we dont yet know what is the cause of the resize which is noticable.

I have set the Image size the same as the OLE object so initially when the slide shows up it is with scale as 100% for both height and width. So for example if the width is 7.71 inches ihave set the image size to 7.71 * 96 = 740 (96 dpi is the setting on my system) . However on double clicking the OLE object the scale chanegs and the object is resized.

I have removed the Lic files and i have removed the Aspose.Cells and Aspose.Slides dlls from the zip to make it lighter. The versions i have used are

Aspose.Cells : 4.8.0.4

Aspose.Slides : 3.1.1.0

It appears that hte even setting the zoom doesn not seem to take effect and the OLE object is resizing.

Sirish

Hi Sirish,

The issue is likely to resolve in the next release.

I am using Aspose Slides 4.0.0.1 and Cells v4.8.0.0 and I am also experiencing this problem. Is there a fix or work around yet?

Hi,

I have just answered you the same question in this thread.

Hi,

Could you let us know the timeline for your next release which would have the fix for this issue ? This will let us plan our deliverables. This issue is on a critical path for our release.

Thanks

Sirish

Hi Sirish,

This issue (issue id 11051) is planned to be resolved in the next release of Aspose.Slides for .NET which is expected in the first or second week of November.

Hi,

What about Aspose.slides for java ?

We face the same issue , the excel embedded in the slide, needs to span first 32 rows and 35 columns , but it displays only till 20th column. Even using the

workbook.setOleSize(0, 32, 0, 35); did not help.

Attached output ppt.
Please Advice.

Hi Vishal,

The resize issue is not specific to the worksheet charts, rather any OLE Object embedded on slide resizes and worksheet chart is one of the OLE Objects. WorkSheets.SetOleSize spans the rows and columns as specified by the parameters. However, there seems a limitation on the number of columns. As this relates to Aspose.Cells product family, you can get technical details on the issue by posting your query here.

Has this issue been fixed in the new release of Aspose Slides? (v4.0.1) Previous message had said it would be addressed in the next release however v4.0.1 does not list this issue has one that was fixed.

Hi,

We planned to fix this issue in release 4.0.1. Unfortunately, this issue is not fixed yet. However, our development team is working on it.

Do you have a new estimate on when this issue will be fixed? We need this fixed if we are to use Aspose Slides and Cells in our application.

Hi,

This issue is marked as 'high' priority, but still we are not having luck to resolve it.

Hi,

Is this issue (ID # 11051) resolved ? Are there any updates on this ?

Thanks

Sirish

Hi Sirish,

Thanks for your interest in Aspose.Slides.

Well, investigations on embedded OLE Object resize issue are still in progress. Our development team is working on it. Unfortunately, currently we are not in the position to determine the timeline for resolution of this issue.

Thanks for the patience.

Best Regards

Are there any updates on this issue? I just got the email about a new release but this issue number was not listed as being addressed in the email.