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 <mbenoit2...@gmail.com> 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: user-unsubscr...@xmlbeans.apache.org For additional commands, e-mail: user-h...@xmlbeans.apache.org