Hi raja.

Don't forget to use the external jar cocdbinterface.jar. Otherwise the
code will be compileable but it will not run.

Regards,        Karl-Heinz Zengerle.


-----Urspr�ngliche Nachricht-----
Von: Marot Laurent [mailto:[EMAIL PROTECTED] 
Gesendet: Freitag, 6. Februar 2004 10:28
An: POI Users List; rajashekhar gandla
Betreff: RE: HOw to read Oracle Data into Excel


just a short extract from a JSP page

hope this will help


OutputStream outp = new FileOutputStream("test.xls"); 
HSSFWorkbook wb = new HSSFWorkbook(); 

HSSFSheet s = wb.createSheet();

wb.setSheetName(0,"Sheet_name");

HSSFRow r = null;
HSSFCell c = null;
int rowCount = 0

resultset = statement.executeQuery("SELECT * FROM TABLE");
while (resultset.next()) { 
 r = s.createRow(rowCount);
 c = r.createCell((short)0);
 c.setCellValue(resultset.getString("Field 1"));
 .
 .
 .
 c = r.createCell((short)i);
 c.setCellValue(resultset.getString("Field i"));

 .
 i++;
}





-----Message d'origine-----
De : rajashekhar gandla [mailto:[EMAIL PROTECTED]
Envoy� : vendredi 6 f�vrier 2004 06:48
� : [EMAIL PROTECTED]
Objet : HOw to read Oracle Data into Excel


HI all,
my problem is. i stored some data in the database(with 3 colums like
no., name, address). now i want to display all that data in to excel
sheet with diffrent colums.
if anybody help i am very much thanks to that person. 
thanks u.
From
raja shekhar

From
rajashekhar

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