poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@daimlerchrysler.com
Subject Re: Multiple Sheets
Date Thu, 13 Feb 2003 20:59:29 GMT




Thanks.  I've tried some different things and right now I'm passing a new
instance to a method with the method call being in a loop.

newSheet(wb.createSheet(orgcode));

The newSheet() method adds all the data/cells, etc.

This gets me what I need.

Thanks again.

BMF



                                                                                         
                                                    
                      Danny Mui                                                          
                                                    
                      <danny@muibros.co        To:       POI Users List <poi-user@jakarta.apache.org>
                                        
                      m>                       cc:                                    
                                                       
                                               Subject:  Re: Multiple Sheets             
                                                    
                      02/13/2003 03:37                                                   
                                                    
                      PM                                                                 
                                                    
                      Please respond to                                                  
                                                    
                      "POI Users List"                                                   
                                                    
                                                                                         
                                                    
                                                                                         
                                                    




A sheet is added to the internal list so each time you call createSheet,
the workbook remembers it.

One way is to try it and see what comes out ;).

http://jakarta.apache.org/poi/hssf/quick-guide.html#NewSheet

danny

bmf5@daimlerchrysler.com wrote:

>Hi!  I'm a newbie to POI and am drawing a blank on how to solve my
problem.
>
>I want to create a workbook w/ multiple sheets (one for each of n org
>codes) but when I start processing I don't know how many.
>
>How can I create a new sheet each time through a loop?  If I do something
>like HSSFSheet sheet = wb.createSheet(orgcode); in the loop I really only
>have one sheet that's been updated multiple times.
>
>If I store each new instance in a List will the workbook "see" them when
it
>comes time to write the file?
>
>TIA for you help and apologies for such an elementary question.
>
>
>BMF
>
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: poi-user-help@jakarta.apache.org
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org





Mime
View raw message