ASF Bugzilla – Attachment 19334 Details for
Bug 40548
Exception in ExternSheetRecord while setting Repeating Rows and Columns
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
updated test case to generate foobar.xls attachment (now writes output)
Test.java (text/plain), 1.99 KB, created by
Andy Oliver
on 2006-12-31 10:43:22 UTC
(
hide
)
Description:
updated test case to generate foobar.xls attachment (now writes output)
Filename:
MIME Type:
Creator:
Andy Oliver
Created:
2006-12-31 10:43:22 UTC
Size:
1.99 KB
patch
obsolete
>import java.io.FileInputStream; >import java.io.FileOutputStream; >import java.io.FileNotFoundException; >import java.io.IOException; >import java.io.InputStream; >import java.io.OutputStream; > >import org.apache.poi.hssf.usermodel.HSSFWorkbook; > >public class Test >{ > > /** > * @param args > */ > public static void main(String[] args) > { > if(args.length < 2) > { > System.out.println("Usage name [filename] [output]"); > } > else > { > String filename = args[0]; > try > { > System.out.println("Opening " + filename); > InputStream str = new FileInputStream(filename); > HSSFWorkbook wb = new HSSFWorkbook(str); > for(int i = wb.getNumberOfSheets() - 2; i >= 0 ; --i) > { > String sheetName = wb.getSheetName(i); > wb.cloneSheet(i); > wb.removeSheetAt(i); > int lastSheet = wb.getNumberOfSheets() - 1; > wb.setSheetName(lastSheet, sheetName); > > } > for(int i = 0; i < wb.getNumberOfSheets(); ++i) > { > String name = wb.getSheetName(i); > System.out.println("Processing sheet " + i + " (" + name > + ")"); > wb.setRepeatingRowsAndColumns(i, -1, -1, 0, 5); > } > OutputStream out = new FileOutputStream(args[1]); > wb.write(out); > out.close(); > System.out.println("Done!"); > } > catch (FileNotFoundException e) > { > // TODO Auto-generated catch block > e.printStackTrace(); > } > catch (IOException e) > { > // TODO Auto-generated catch block > e.printStackTrace(); > } > } > > } > >}
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 40548
:
18886
|
18887
|
19333
| 19334 |
19335