Writing to Excel File

Dear friends,

I have to write to an excel file but i am unable to do so. The following is the code fragment:

HSSFWorkbook wb =new HSSFWorkbook();

FileOutputStream fileOut =new FileOutputStream("C:\\\\Output.xls");

wb.write(fileOut);

HSSFSheet sheet = wb.createSheet();

HSSFRow row= sheet.createRow((short)0);

HSSFCell cell= row.createCell((short)0);

cell.setCellValue("Hi");

fileOut.close();

Could somebody tell me the reason behind it?

[695 byte] By [subhashmedhia] at [2007-11-27 11:41:13]
# 1

Kindly help me out.

subhashmedhia at 2007-7-29 17:36:52 > top of Java-index,Java Essentials,Java Programming...
# 2

Check out this website it should help

http://www.onjava.com/pub/a/onjava/2003/04/16/poi_excel.html

mark07a at 2007-7-29 17:36:52 > top of Java-index,Java Essentials,Java Programming...