Bump? Hey I saw you filed a bug (XMLBEANS-475) regarding this issue but didn't post further information to the list. I've got to be honest, from the text, I'm not really sure how this is an xmlbeans issue. Can you explain further? Is xmlbeans corrupting something? It sounds like POI is placing an element at a location where Microsoft isn't processing it correctly. -jacobd
On Tue, Jan 3, 2012 at 11:34 AM, Jacob Danner <[email protected]> wrote: > Hey Michael, > I don't have the knowledge of POI to really understand whats going on > here but I'll give it a shot. > >> patriarch.createLinkedPicture(anchor, uri.toString()); > What is uri.toString here? is uri and xmlbeans type? if so, what is it > a type of? What were you expecting the value to be? > it looks likes the code should create something like > <a href="uri.toString()" .../> > is that correct? > If so, where does the image/link href get interpretted? > >> workbook.write(outDoc); > Can you post the resulting code snippet of this section of the > workbook to highlight the error in the output? > > Thanks, > -jacobd > > > On Tue, Jan 3, 2012 at 11:27 AM, Michael Benoit <[email protected]> wrote: >> When adding a linked image to an XLSX using POI that already has at least >> one drawing, the resulting file is corrupted but can be recovered. However >> the original drawings are gone. >> >> Here is a code fragment: >> Workbook workbook = getWorkbook(doc); >> Sheet sheet = workbook.getSheetAt(0); >> Drawing patriarch = sheet.createDrawingPatriarch(); >> ClientAnchor anchor = >> workbook.getCreationHelper().createClientAnchor(); >> anchor.setCol1(0); >> anchor.setRow1(0); >> anchor.setDx1(100); >> anchor.setDy1(100); >> patriarch.createLinkedPicture(anchor, uri.toString()); >> workbook.write(outDoc); >> doc.close(); >> outDoc.close(); >> >> I know that POI does not consider this a bug on their end so I was wondering >> if this has to do with xmlbeans and if I could custom compile xmlbeans so >> that I don't have this problem. >> >> Thanks, >> Michael Benoit --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

