ASF Bugzilla – Attachment 13459 Details for
Bug 32241
Excel crashing when doing Copy/Paste...
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
Test class which generates test1.xls
Test.java (text/plain), 1.43 KB, created by
Jens Behrens
on 2004-11-15 11:48:09 UTC
(
hide
)
Description:
Test class which generates test1.xls
Filename:
MIME Type:
Creator:
Jens Behrens
Created:
2004-11-15 11:48:09 UTC
Size:
1.43 KB
patch
obsolete
>import java.io.File; >import java.io.FileInputStream; >import java.io.FileOutputStream; >import java.util.Enumeration; >import java.util.Iterator; > >import org.apache.poi.hssf.usermodel.HSSFCell; >import org.apache.poi.hssf.usermodel.HSSFRow; >import org.apache.poi.hssf.usermodel.HSSFSheet; >import org.apache.poi.hssf.usermodel.HSSFWorkbook; >import org.apache.poi.poifs.filesystem.POIFSFileSystem; > >import de.brieger.doc4j.datamapper.DataIF; >import de.brieger.doc4j.datamapper.impl.SingleData; >import de.rhenus.xls4j.parser.rules.impl.AbstractXLS4JRule; > > >public class Test { > > public static void main(String[] args) { > try { > File f = new File("d:/temp/test.xls"); > FileInputStream ifs = new FileInputStream(f); > POIFSFileSystem fs = new POIFSFileSystem(ifs); > HSSFWorkbook wb = new HSSFWorkbook(fs); > /*HSSFSheet s = wb.getSheet("Abrechnungsdaten"); > HSSFRow r = s.getRow(1); > Iterator it = r.cellIterator(); > while(it.hasNext()) { > HSSFCell cell = (HSSFCell)it.next(); > cell.setCellValue("TEST"); > } > */ > File fo = new File("d:/temp/test1.xls"); > FileOutputStream os = new FileOutputStream(fo); > wb.write(os); > os.close(); > ifs.close(); > } catch(Exception x) { > x.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 32241
:
13457
|
13458
| 13459 |
13460