Hi,

I still see the problem with 3.8-beta3-20110505.
The way of reproduction is the following:
1. Create a ppt presentation with PowerPoint 2007 and embed a xls(x) file
into it.
2. Create a workbook with Apache POI.
3. Open ppt presentation with Apache POI and replace corresponding OLEShape
entry with new workbook.

As result I have the following message in PowerPoint 2007 when I try to open
embedded file: "The server
application, source file, or item can't be found, or returned as an
unknown error. You may need to reinstall the server application.".

OpenOffice 3.2.1 opens embedded file perfectly well.

The source code is something like that:

SlideShow ppt = new SlideShow(new HSLFSlideShow(file.getPath()));
Slide[] slides = ppt.getSlides();
Slide slide = slides[0];

for (Shape s : slide.getShapes()) {
        if (s instanceof OLEShape) {
                OLEShape ole = (OLEShape) s;
                ObjectData data = ole.getObjectData();
                data.setData(getWorkbookBytes(workbookInstance));
        }
}

FileOutputStream fos = new FileOutputStream(file);
ppt.write(fos);
fos.close();


Thank you in advance,
Roman

--
View this message in context: 
http://apache-poi.1045710.n5.nabble.com/Workarounds-solutions-to-embed-worksheets-to-Slides-using-POI-tp2300252p4372242.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to