You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by khan379 <ak...@i-behavior.com> on 2010/03/16 00:55:38 UTC

reading xls or xlsx file using SS model

Hi,
we are using HSSF model POI 3.2 to read xls files. i have attached the java
class file that does this. this was written long back by a developer who is
not working any more.
we often get xlsx file so i was planning to switch to POI 3.5-FNAL and use
SS model to read both xls and xlsx formats. 
the class i have attached heavily uses org.apache.poi.hssf.eventusermodel
and i dont know much how i can convert this file to read xlsx files. 

can someone point me in the right direction and refer me any helpful docs. 
PS: please look at the run method of the thread in the attached file. its
called from the class constructor.

Thank you. http://old.nabble.com/file/p27911945/XLSReader.java
XLSReader.java 
-- 
View this message in context: http://old.nabble.com/reading-xls-or-xlsx-file-using-SS-model-tp27911945p27911945.html
Sent from the POI - User mailing list archive at Nabble.com.


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


Re: reading xls or xlsx file using SS model

Posted by khan379 <ak...@i-behavior.com>.
Thank you. i'll take a look at it now.


Nick Burch-11 wrote:
> 
> On Mon, 22 Mar 2010, khan379 wrote:
>> can i implement same low level + low memory event based parsing for xlsx
>> files ? (using XSSF or SS model, doesnt matter).
> 
> This gives an example of low level parsing of XLSX workbooks with XSSF and 
> sax:
>  	http://poi.apache.org/spreadsheet/how-to.html#xssf_sax_api
> 
> Nick
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/reading-xls-or-xlsx-file-using-SS-model-tp27911945p27989029.html
Sent from the POI - User mailing list archive at Nabble.com.


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


Re: reading xls or xlsx file using SS model

Posted by Nick Burch <ni...@alfresco.com>.
On Mon, 22 Mar 2010, khan379 wrote:
> can i implement same low level + low memory event based parsing for xlsx
> files ? (using XSSF or SS model, doesnt matter).

This gives an example of low level parsing of XLSX workbooks with XSSF and 
sax:
 	http://poi.apache.org/spreadsheet/how-to.html#xssf_sax_api

Nick

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


Re: reading xls or xlsx file using SS model

Posted by khan379 <ak...@i-behavior.com>.
Hi Nick,
Thanks for the reply. I dont want to touch the already working HSSF evetn
based implementation we have for xls reading. 
can i implement same low level + low memory event based parsing for xlsx
files ? (using XSSF or SS model, doesnt matter).
can you direct me to a skeleton implementation of such.


Nick Burch-11 wrote:
> 
> On Mon, 22 Mar 2010, khan379 wrote:
>> khan379 wrote:
>>> we often get xlsx file so i was planning to switch to POI 3.5-FNAL and
>>> use
>>> SS model to read both xls and xlsx formats.
>>> the class i have attached heavily uses
>>> org.apache.poi.hssf.eventusermodel
>>> and i dont know much how i can convert this file to read xlsx files.
> 
> You'll have to choose. You can either use the common SS interface, which 
> hides the differences between XLS and XLSX, or you can have the low level 
> + low memory event based parsing, but have to write two implementations.
> 
> Nick
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/reading-xls-or-xlsx-file-using-SS-model-tp27911945p27988814.html
Sent from the POI - User mailing list archive at Nabble.com.


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


Re: reading xls or xlsx file using SS model

Posted by Nick Burch <ni...@alfresco.com>.
On Mon, 22 Mar 2010, khan379 wrote:
> khan379 wrote:
>> we often get xlsx file so i was planning to switch to POI 3.5-FNAL and use
>> SS model to read both xls and xlsx formats.
>> the class i have attached heavily uses org.apache.poi.hssf.eventusermodel
>> and i dont know much how i can convert this file to read xlsx files.

You'll have to choose. You can either use the common SS interface, which 
hides the differences between XLS and XLSX, or you can have the low level 
+ low memory event based parsing, but have to write two implementations.

Nick

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


Re: reading xls or xlsx file using SS model

Posted by khan379 <ak...@i-behavior.com>.
Hi,
I would really appreciate any inputs in the direction i should go.
Thank you.


khan379 wrote:
> 
> Hi,
> we are using HSSF model POI 3.2 to read xls files. i have attached the
> java class file that does this. this was written long back by a developer
> who is not working any more.
> we often get xlsx file so i was planning to switch to POI 3.5-FNAL and use
> SS model to read both xls and xlsx formats. 
> the class i have attached heavily uses org.apache.poi.hssf.eventusermodel
> and i dont know much how i can convert this file to read xlsx files. 
> 
> can someone point me in the right direction and refer me any helpful docs. 
> PS: please look at the run method of the thread in the attached file. its
> called from the class constructor.
> 
> Thank you. http://old.nabble.com/file/p27911945/XLSReader.java
> XLSReader.java 
> 

-- 
View this message in context: http://old.nabble.com/reading-xls-or-xlsx-file-using-SS-model-tp27911945p27988541.html
Sent from the POI - User mailing list archive at Nabble.com.


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