6 Replies - 221 Views - Last Post: 03 June 2019 - 10:33 PM Rate Topic: -----

#1 Larry71   User is offline

  • D.I.C Head

Reputation: 7
  • View blog
  • Posts: 82
  • Joined: 05-June 12

Export data to file as tables

Posted 01 June 2019 - 02:23 AM

Hallo,

I have some data saved in arrayLists in my Java programm.
What I want is to export them to a document.It can be a .doc file but I prefer .pdf and I want them to be presented as tables but vertically.
The biggest problem that I am facing is that the lists don't have the same size and that means that some cells may be empty.

Thank you.

This post has been edited by Larry71: 01 June 2019 - 02:32 AM

Is This A Good Question/Topic? 0
  • +

Replies To: Export data to file as tables

#2 wseng92   User is offline

  • D.I.C Addict
  • member icon

Reputation: 49
  • View blog
  • Posts: 679
  • Joined: 23-September 15

Re: Export data to file as tables

Posted 01 June 2019 - 02:46 AM

How the .pdf file should look like?

This post has been edited by wseng92: 01 June 2019 - 02:47 AM

Was This Post Helpful? 0
  • +
  • -

#3 Larry71   User is offline

  • D.I.C Head

Reputation: 7
  • View blog
  • Posts: 82
  • Joined: 05-June 12

Re: Export data to file as tables

Posted 01 June 2019 - 03:19 AM

View Postwseng92, on 01 June 2019 - 02:46 AM, said:

How the .pdf file should look like?

What exactly do you mean?
Suppose in my program I have classes such as School,Class,Students,Subject. I want to have something like:

School number 1

Class A:

Table with students. Every row has a student, every column has the grades of the student in different subject.

Class B: .....

Then again

School number 2 etc.
Was This Post Helpful? 0
  • +
  • -

#4 g00se   User is offline

  • D.I.C Lover
  • member icon

Reputation: 3638
  • View blog
  • Posts: 16,706
  • Joined: 20-September 08

Re: Export data to file as tables

Posted 01 June 2019 - 07:06 AM

Why not make a school a workbook? Every class could be a sheet in that workbook and your student grades would be the contents of that spreadsheet

This post has been edited by g00se: 01 June 2019 - 07:06 AM

Was This Post Helpful? 0
  • +
  • -

#5 Larry71   User is offline

  • D.I.C Head

Reputation: 7
  • View blog
  • Posts: 82
  • Joined: 05-June 12

Re: Export data to file as tables

Posted 01 June 2019 - 10:48 AM

View Postg00se, on 01 June 2019 - 07:06 AM, said:

Why not make a school a workbook? Every class could be a sheet in that workbook and your student grades would be the contents of that spreadsheet

Even though it is an interesting approach, I prefer the solution of a pdf, .doc or txt file, since all data can easily be found at the same page. The classes I mentioned were just an example, in fact the data are about 15 to 30 arraylists of size 10 each.
Was This Post Helpful? 0
  • +
  • -

#6 g00se   User is offline

  • D.I.C Lover
  • member icon

Reputation: 3638
  • View blog
  • Posts: 16,706
  • Joined: 20-September 08

Re: Export data to file as tables

Posted 01 June 2019 - 02:15 PM

In that case you're going to need to get in to a Java pdf api like iText or PdfBox
Was This Post Helpful? 1
  • +
  • -

#7 Larry71   User is offline

  • D.I.C Head

Reputation: 7
  • View blog
  • Posts: 82
  • Joined: 05-June 12

Re: Export data to file as tables

Posted 03 June 2019 - 10:33 PM

View Postg00se, on 01 June 2019 - 02:15 PM, said:

In that case you're going to need to get in to a Java pdf api like iText or PdfBox


Started using iText, had some difficulties with some special chars, but everything is fine now.
Thank you!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1