ASF Bugzilla – Attachment 5196 Details for
Bug 17759
[PATCH][RFE]Add a way to change the displayed sheet in usermodel API
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
Testcase to find this problem.Please do it and open "Output.xls" with Excel Application.
TestSheetSelect.java (text/plain), 810 bytes, created by
Toshiaki Kamoshida
on 2003-03-07 04:16:26 UTC
(
hide
)
Description:
Testcase to find this problem.Please do it and open "Output.xls" with Excel Application.
Filename:
MIME Type:
Creator:
Toshiaki Kamoshida
Created:
2003-03-07 04:16:26 UTC
Size:
810 bytes
patch
obsolete
>import java.io.FileOutputStream; > >import junit.framework.TestCase; >import org.apache.poi.hssf.usermodel.HSSFSheet; >import org.apache.poi.hssf.usermodel.HSSFWorkbook; > >/** > * @author T.Kamoshida > */ >public class TestSheetSelect extends TestCase { > > /** > * Constructor for TestSheetSelect. > * @param arg0 > */ > public TestSheetSelect(String arg0) { > super(arg0); > } > > public void testSheetSelect(){ > try{ > HSSFWorkbook b = new HSSFWorkbook(); > HSSFSheet s1 = b.createSheet(); > s1.createRow(0).createCell((short)0).setCellValue("Sheet0"); > HSSFSheet s2 = b.createSheet(); > s2.createRow(0).createCell((short)0).setCellValue("Sheet1"); > s2.setSelected(true); > > b.write(new FileOutputStream("Output.xls")); > } > catch(Exception e){fail(e.getMessage());} > } > >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 17759
: 5196 |
6265
|
6416