Hi Jana,

I guess you need to do 
HSSFSheet otherSheet = workbook.getSheetAt(1);

And check the sheet2 as well.

Regards,
Rishi

-----Original Message-----
From: janarthanankesavan [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 16, 2004 2:34 PM
To: [EMAIL PROTECTED]
Cc: Balaji Muniraja
Subject: Problem

  
Dear All,
I have a new problem now.

I have 2 work sheets in my work book.
I have to read them and take values from them and populate them in a jsp combo box.
HSSFSheet sheet = workbook.getSheetAt(0);
HSSFRow row = sheet.getRow(2);
for (int c = 1; c <= row.getLastCellNum(); c++) {

HSSFCell cell = row.getCell((short) c);
if( cell != null && cell.getStringCellValue() != null){
Object obj =cell.getStringCellValue();
}

Am using this piece of code to populate the combo box.
But,am getting it from only the first sheet.
How to get values from second sheet also?

Reg
Jana

Life is not a bed of roses!
----------------------------
With warmest regards,
T.K.Janarthanan. 
--------------------------------------------------------
 
NOTICE: If received in error, please destroy and notify sender.  Sender does not waive 
confidentiality or privilege, and use is prohibited. 
 

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

Reply via email to