Page 1 of 1

Adding images to XLSX, part II

PostPosted: Sun May 26, 2013 10:31 pm
by mrOlicas
Hello Jason,

in my team we are already using pptx4j for creating slides.

Therefore I'd like very much to use xlsx4j for our XLS-Reports.


I am having trouble adding a picture, tough. I saw the thread in 'Adding images to XLS' in this same forum, but there is code missing.
Could you provide some short cookbook ("you need a Drawing, of course a spreadsheet and a..") or code snippets to get me and maybe others going? I think a fifth class under "samples" would also be great and certainly very helpful.

I have access to the code, but still, it is trial an error until it works, and as you know time is always short.

Thanks in advance for your time,

mrOlicas

Re: Adding images to XLSX, part II

PostPosted: Mon May 27, 2013 10:12 pm
by jason

Re: Adding images to XLSX, part II

PostPosted: Mon May 27, 2013 11:17 pm
by mrOlicas
Hi,

thank you very much, that helped a lot!

I was also going into the "Give him an XML with parameters and unmarshall"-Way, but it takes a little time to get to this idea, first thing you try is to do it all by code, which is not the way to go for many cases I suppose; an XML is (most of the time) easier to handle. You also have to be aware of the fact that you can take a file like example.xlsx, rename it and unzip it to look at the underlying XML structure, so you know what must be build to achieve the result.


Thanks also for the fast response. Im am sure this will help others looking for am XSLX API.


Greetings from here
mrOlicas

Re: Adding images to XLSX, part II

PostPosted: Tue May 28, 2013 12:01 am
by jason
mrOlicas wrote:you can take a file like example.xlsx, rename it and unzip it to look at the underlying XML structure,


Easier now is to use http://webapp.docx4java.org/

It effectively does the unzipping for you, and then goes on to generate code as well. I used it to create the example posted.