To All:

I am positive that my problem is not related to a misspelling or typo of
any sort. The point is by merely keying something (anything) on the "new"
worksheet it enables POI to write to it using the same EXACT code,
unaltered. I should have mentioned in my simple example that I have another
template (Template.xls) that I tested with. This template has only a single
space character in cell A:1 on Sheet2 and my code will write to this sheet
with no problem.

Thank you to all who have replied so far,
-Cliff
----- Forwarded by Clifton C Craig/US/DNY on 06/18/2003 03:13 PM -----
                                                                                       
                                                
                      [EMAIL PROTECTED]                                                
                                                
                      .com                     To:       "POI Users List" <[EMAIL 
PROTECTED]>                                
                                               cc:                                     
                                                
                      06/18/2003 03:10         Subject:  Re: Cannot write to extra 
sheets                                              
                      PM                                                               
                                                
                      Please respond to                                                
                                                
                      "POI Users List"                                                 
                                                
                                                                                       
                                                
                                                                                       
                                                





Steve,

Yes, I tried the getSheetAt(int idx) method initially. I've tried various
renditions. Try my example on your system and tell me what you come out
with. I'm using POI version 1.8 but I have tried the latest version 2.0 and
got the same results.

-Cliff



                      "Steve"
                      <[EMAIL PROTECTED]        To:       "POI Users List"
                      <[EMAIL PROTECTED]>
                      M>                       cc:
                                               Subject:  Re: Cannot write
                      to extra sheets
                      06/18/2003 03:00
                      PM
                      Please respond to
                      "POI Users List"






perhaps you should not rely on the name being "Sheet2"
did you try it like this:
String sheetname = wb.getSheetName(sheetnumber);
HSSFSheet sheet = wb.getSheet(sheetname);


---------------------------------------------------------------------
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