• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jakarata POI add cells problem

 
hani Ibrahim
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,
im new to Jakarta POI i want to generate excel file.I used HelloExcel examples and it work greately.But my problem is : if i have ArrayList of beans and i want to iterate them in EXcel how to make that in dynamic way.
i want to make method to give it this ArrayList and it will iterate and generate Excel file.
Is that possible please tell me?
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sure is. Do you know how to iterate through a List in general using iterators? What do you have so far, and what exactly are you stuck with?
 
hani Ibrahim
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Im stuck with an idea not how to iterate like make a method to give it an arraylist and it is complete to add cells . because i cant know when this method recived X # of columns and N # of rows how to manage that Dynamically?
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A list is one-dimensional, while a spreadsheet it two-dimensional. You will need to determine beforehand how to distribute the list elements over the spreadsheet area. So - how should that work?

(A row in an Excel sheet can have up to 255 cells, if that's any help.)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic