create pdf from multiple excel sheets and tabs in Java

1.7k Views Asked by At

I want to read some excel files with multiple sheets in it.

All sheets should be printed 2 on 1 in a pdf.

I've found the jodconverter library. If there are better or easier opinions please tell me.

simplified descripton of the text

May important: i don't want to change something in the xls files, if not necessary.

EDIT: Following approach, merging all the xls with apache poi and print them to one pdf, I think i need a option to configure the "printer". How can I do that?

EDIT2:

I've found a way to print directly xls to pdf with the jxcell-library. There is an example for printing a pdf from a xls file. But mutliple spreadsheet arent listend. So i'll going to seperate them with poit, print them to pdf, and merge it.

If you know a faster or easyier solution, feel free to answer.

1

There are 1 best solutions below

0
On

Here's how I would do it:

  1. Read excel data using the apache poi library.
  2. Make a loop to generate html tables based on the data you get from apache poi.
  3. Use wkhtmltopdf to generate pdf out of that html.