On 02/26/10 02:59, Ingrid Halama wrote: > Hi,
> In case the draw page from spreadsheet is used it is ok to export only the first shape from that page (as this first shape is the chart as it seems in this scenario). But different if you use the draw page of the chart. In that case it is wrong to only export the first shape. Try to use the draw page itself for export instead. Hope that helps, Ingrid Hi Ingrid, The draw page of the chart has only one shape (drawPage.getCount()returns 1). I've tried to use the draw page for exporting but It was failed, no image has been exported. The exporting code is: XDrawPageSupplier drawPageSupplier = UnoRuntime.queryInterface(XDrawPageSupplier.class, aChartDoc); XDrawPage drawPage = drawPageSupplier.getDrawPage(); XComponent xDrawPageComp = (XComponent) UnoRuntime.queryInterface(XComponent.class, drawPage); //Create an exporter XExporter exporter = (XExporter)UnoRuntime.queryInterface( XExporter.class, xMultiServiceFactory.createInstance("com.sun.star.drawing.GraphicExportFilte r")); PropertyValue[] exportProperties = new PropertyValue[2]; exportProperties[0] = new PropertyValue(); exportProperties[0].Name = "MediaType"; exportProperties[0].Value = "image/jpeg"; exportProperties[1] = new PropertyValue(); exportProperties[1].Name = "URL"; exportProperties[1].Value = "file:///E:/Temp/Chart_OO.jpeg <file:///E:\Temp\Chart_OO.jpeg> "; exporter.setSourceDocument(xDrawPageComp); XFilter drawFilter = (XFilter) UnoRuntime.queryInterface(XFilter.class, exporter); drawFilter.filter(exportProperties); Best regards, Doan Nguyen Van