This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes reading excel xlsx files to convert into CSV format Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "reading excel xlsx files to convert into CSV format" Watch "reading excel xlsx files to convert into CSV format" New topic
Author

reading excel xlsx files to convert into CSV format

Reshma Reddy
Ranch Hand

Joined: Dec 21, 2006
Posts: 197
Hi All,
I am trying to read excel (xlsx) fiels using apache POI, I got one example from internet but it is not working. I am bot able to find issue code. Can any one check this code and let me know what is the issue and where i have modify code.
I m agettign nullpointer error in process method.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19651
    
  18

Please post the exception stack trace.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Reshma Reddy
Ranch Hand

Joined: Dec 21, 2006
Posts: 197

Error details,
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19651
    
  18

Reshma Reddy wrote:
Error details,

The error is not coming from XLSX2CSV.process but from XSSFReader.SheetIterator.hasNext. Can you show us the code for that nested class? Please also indicate which line of that class is line 207 in the source file.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37945
    
  22
That question is too difficult for “beginning”, so I have moved it.
Reshma Reddy
Ranch Hand

Joined: Dec 21, 2006
Posts: 197
Rob,

I made a mistake in XLSX2CSV class, I was refering my local XSSFReader class which is wrong. I have modified code to refer org.apache.poi.xssf.eventusermodel.XSSFReader class, now it is workign fine. I am able to read xlsx files.
But it is taking around 10 mins time to read around 50 mb file, can you tell me in which part of code I can refactor to reduce processing time.

Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: reading excel xlsx files to convert into CSV format
 
Similar Threads
Setting foreground of a table cell on date column
JCheckBox in JTable not working
Read a .xls,.xlsx file format using XSSF
JTable shows previous data
JTable and Custom Columns