poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 17759] - [PATCH][RFE]Add a way to change the displayed sheet in usermodel API
Date Tue, 20 May 2003 07:17:20 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17759>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17759

[PATCH][RFE]Add a way to change the displayed sheet in usermodel API

kamoshida.toshiaki@future.co.jp changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[RFE]Add a way to change the|[PATCH][RFE]Add a way to
                   |displayed sheet in usermodel|change the displayed sheet
                   |API                         |in usermodel API



------- Additional Comments From kamoshida.toshiaki@future.co.jp  2003-05-20 07:17 -------
Please apply the PATCH and execute it and check Test1.xls and Test2.xls with 
Excel Application.

import java.io.FileOutputStream;

import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;

public class Test {
	public static void main(String[] args) throws Exception{
		HSSFWorkbook book = new HSSFWorkbook();
		HSSFSheet s1 = book.createSheet("Test1");
		HSSFSheet s2 = book.createSheet("Test2");
		book.write(new FileOutputStream("Test1.xls"));
		s1.setSelected(false);
		s2.setSelected(true);
		book.setSelectedSheet("Test2");
		book.write(new FileOutputStream("Test2.xls"));
	}
}

Mime
View raw message