java - Having trouble with WritableSheet.addImage(WritableImage) -
i'm using jxl (jexcelapi) save excel file, copying existing excel file new file , modifying copy. i've had great success in doing so, except 1 issue.
i'm trying save 2 different png images @ 2 different locations in excel sheet. call following function 2 successive times (once each image), different row index , different pngfile each time:
private static void putpnginexcel(file pngfile, int column, int row, int widthincolumns, int heightinrows, writablesheet worksheet) { writableimage image = new writableimage(column, row, widthincolumns, heightinrows, pngfile); worksheet.addimage(image); } basically, seems if call above function twice, second call should, ie. second png image appears in excel sheet, not first png image. maybe i'm doing silly, i'm wondering if aware of known jxl issue in regard?
i'm not seeing uncaught exceptions being thrown.
i've confirmed valid png files being passed above function both times executed.
i've swapped png file goes each call of above function, , confirmed png associated second function call 1 gets added excel sheet successfully.
i've deleted 1 of calls above function, leaving 1 call, , confirmed see relevant png image on excel sheet should (i tried passing different combinations of png files , row/column indices , worked fine 1 call above function).
i haven't tried more 2 calls, looks recent call above function works.
Comments
Post a Comment