aspose file tools*
The moose likes Other Open Source Projects and the fly likes Jakarata POI add cells problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Jakarata POI add cells problem" Watch "Jakarata POI add cells problem" New topic
Author

Jakarata POI add cells problem

hani Ibrahim
Ranch Hand

Joined: Sep 06, 2006
Posts: 182
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
Marshal

Joined: Mar 22, 2005
Posts: 41885
    
  63
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?


Ping & DNS - my free Android networking tools app
hani Ibrahim
Ranch Hand

Joined: Sep 06, 2006
Posts: 182
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
Marshal

Joined: Mar 22, 2005
Posts: 41885
    
  63
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.)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Jakarata POI add cells problem