File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Open Source Projects and the fly likes Excel parsing in Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Excel parsing in Java" Watch "Excel parsing in Java" New topic
Author

Excel parsing in Java

Krishan Chauhan
Ranch Hand

Joined: Mar 12, 2008
Posts: 32
Hi

I am using Apache POI event model with record awareness for parsing Microsoft Excel file. I am able to successfully parse the contents but i am facing problem in validating it. i don't care about the actual data present but want to validate some basic things like number of columns present in each row. Could any one suggest how to do it?


Thanks in Advance.
Kuladip Yadav
Ranch Hand

Joined: Jul 30, 2008
Posts: 162

Hi,

number of columns present in each row


You can iterate over excel row using HSSFRow 's cellIterator method . from that you can estimate number of column
for each row .
Check this API Link
[ September 10, 2008: Message edited by: Kuldeep Yadav ]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39535
    
  27
What exactly do you mean by "parsing" and "validating"? POI can read and write XLS files, and provides access to cell contents; no more, no less. if you want certain cells to have certain contents (or rule out certain other contents) you will have to write code to check that.


Ping & DNS - updated with new look and Ping home screen widget
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Excel parsing in Java
 
Similar Threads
XML Parsing Error
Installing APK from SD Card
Push parsing and Pull parsing of Streaming API.
Javascript Excel Sheet API
How to convert excel sheets exponential cell format to java string