thanks for the rapid reply, but i try to read an excel file, not to create one.
regards.. -----Original Message----- From: Ozge Erenoglu [Oyak Bank] [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 05, 2005 12:53 PM To: 'POI Users List' Subject: RE: reading excel file My code is below , You have to erase fs in workbook definition. String dosyaadi="c:\\rapor.xls"; HSSFWorkbook wb = new HSSFWorkbook(); FileOutputStream fileOut = new FileOutputStream(dosyaadi); //SHEET HSSFSheet likidite = wb.createSheet("Likidite"); regards.. -----Original Message----- From: Osman Çınar Eren [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 05, 2005 10:40 AM To: [email protected] Subject: reading excel file hi, i have downloaded the binary version of poi. I included poi-2.5.1-final-20040804.jar in my classpath. i want to move the content of the excel file into a text file. first i tried the event based model but i guess i missed something: i expected to see the rows in a logical order, such as first a RowRecord, then all of the Records in that ROW. but in the output the RowRecords come one after the other. Any help? then i tried the old method: open the workbook, get the sheet, get the row, get the cell... POIFSFileSystem fs = new POIFSFileSystem(new FileInputStream("C:\\H2.xls")); HSSFWorkbook wb = new HSSFWorkbook(fs); in the last line, i get the following exception: Exception in thread "main" java.lang.ClassCastException at java.util.TreeMap.compare(TreeMap.java:1085) at java.util.TreeMap.put(TreeMap.java:463) at org.apache.poi.hssf.record.aggregates.ValueRecordsAggregate.insertCel l(ValueRecordsAggregate.java:65) at org.apache.poi.hssf.record.aggregates.ValueRecordsAggregate.construct (ValueRecordsAggregate.java:130) at org.apache.poi.hssf.model.Sheet.createSheet(Sheet.java:210) at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:1 72) at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:1 30) at poi.Poi.main(Poi.java:32) any ideas? i will greatly appreciate any help. thanks in advance. best regards.. Kişiye özel bu mesaj ve içeriğindeki bilgiler gizlidir. Oyak Bank bu mesajın içeriği ve ekleri ile ilgili olarak hukuksal hiçbir sorumluluk kabul etmez.Yetkili alıcılardan biri değilseniz, bu mesajın herhangi bir şekilde ifşa edilmesi, kullanılması, kopyalanması,yayılması veya mesajda yeralan hususlarla ilgili olarak herhangi bir işlem yapılmasının kesinlikle yasak olduğunu bildiririz.Böyle bir durumda lütfen hemen mesajın göndericisini bilgilendiriniz ve mesajı sisteminizden siliniz.Internet ortamında gönderilen e-posta mesajlarındaki hata ve/veya eksikliklerden veya virüslerden dolayı mesajın göndericisi herhangi bir sorumluluk kabul etmemektedir.Teşekkür ederiz. The information contained in this communication may contain confidential or legally privileged information. Oyak Bank doesn't accept any legal responsibility for the contents and attachments of this message. If you are not the intended recipient you are hereby notified that any disclosure, use, copying, distribution or taking any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify the sender immediately by responding to this e-mail and then delete it from your system. The sender does not accept any liability for any errors or omissions or any viruses in the context of this message which arise as a result of internet transmission. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
