poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lynn Li <lynn...@gm.com>
Subject RE: When using SAXParser to parse xlsx file, blank cells are skipped
Date Wed, 24 Feb 2016 23:01:51 GMT
Thank you, Nick. Code in XLSX2CSV.java works for me.

Lynn

-----Original Message-----
From: Nick Burch [mailto:apache@gagravarr.org]
Sent: Monday, February 22, 2016 6:08 PM
To: POI Users List <user@poi.apache.org>
Subject: Re: When using SAXParser to parse xlsx file, blank cells are skipped

On Mon, 22 Feb 2016, Lynn Li wrote:
> When using SAXParser to parse xlsx file, blank cells are skipped.
>
> Does anyone have code to not skip blank cells using SAXParser? Any
> help you can provide is appreciated.

You just need to keep track of the cell reference of the last cell seen, and spot gaps from
that. It's fairly easy to do, a good example is in the XLSX to CSV example that uses the SAX
parsing stuff to do it:
https://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/xssf/eventusermodel/XLSX2CSV.java

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org For additional commands, e-mail: user-help@poi.apache.org



Nothing in this message is intended to constitute an electronic signature unless a specific
statement to the contrary is included in this message.

Confidentiality Note: This message is intended only for the person or entity to which it is
addressed. It may contain confidential and/or privileged material. Any review, transmission,
dissemination or other use, or taking of any action in reliance upon this message by persons
or entities other than the intended recipient is prohibited and may be unlawful. If you received
this message in error, please contact the sender and delete it from your computer.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Mime
View raw message