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                                                        
                                                       
                      <[EMAIL PROTECTED]        To:       POI Users List 
<[EMAIL PROTECTED]>                                         
                      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

[EMAIL PROTECTED] 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: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to