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

Free Support Forum - aspose.com

Cells OleObject without Border Line


Hi,

I would like to insert an ole object (here a word doc) into an excel document without border line surrounding the ole object shape. The following java code let me successfully insert the ole object, but unfortunately the shape still has a border line:

//Add an Ole object into the worksheet with the image img
OleObject oleObj = shapes.addOleObject(23, 1, 0, 0, img, data);
oleObj.setPlacement(PlacementType.MOVE_AND_SIZE);
// This code has no effect on the border line which still exists in the excel document
oleObj.setHasLine(false);

Is there a way to do that in aspose cells?

Thanks in advance.

Hi,

Thanks for pointing it out.

Yes, we found the setHasLine() method is not working properly, we will figure it out soon.

I think, currently, you may try to add a few lines (given below) instead if it fits your requirement.

e.g..,

//Add an Ole object into the worksheet with the image img
OleObject oleObj = shapes.addOleObject(23, 1, 0, 0, img, data);
oleObj.setPlacement(PlacementType.MOVE_AND_SIZE);
ShapeLine sl = oleObj.getLine();
sl.setColor(Color.WHITE);

Thank you.


Thanks you for your answer, the workaround you gave me looks sufficient for the moment. Furthermore, i would like to know if it’s possible, when i add an ole object into an excel document, to display the content of the object (for instance a word document being added to excel) straight instead of the image inserted using the following code:

//Add an Ole object into the worksheet with the image img
OleObject oleObj = shapes.addOleObject(23, 1, 0, 0, img, data);


I found an object in aspose word that maybe do the trick: Shape.OleFormat and its method setOleIcon(boolean value). Is there a similar object existing into aspose excel or do you think it’s not possible?

Best regards.

Hi,

Ok, we will check the feasibility if we could provide the similar feature for your requirement.

Thank you.

Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for considering Aspose.

Please try the attached latest fix for the issue of removing the border line of OleObject. For the feature of displaying content of OleObject instead of image, we will look into it soon.

Thank You & Best Regards,