You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Roland Brassous <ro...@silogic.fr> on 2005/08/24 14:01:56 UTC
set focus to the second sheet
Hi everyone,
I am new in the HSSF world.
I try to create a workbook, with the focus on the second sheet.
Here is my code:
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sheet1 = wb.createSheet("new sheet");
HSSFSheet sheet2 = wb.createSheet("second sheet");
sheet1.setSelected(false);
sheet2.setSelected(true);
FileOutputStream fileOut = new
FileOutputStream("c:/workbooktest.xls");
wb.write(fileOut);
fileOut.close();
When i open the excel document,the second sheet is selected, but i have the
first sheet data displayed.
What is wrong?
Any idea?
Thanks
Roland
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/