You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by visu <sh...@yahoo.com> on 2008/05/17 00:00:47 UTC

total records using event model

How do i find out how many total records are in excel file while using event
model.
-- 
View this message in context: http://www.nabble.com/total-records-using-event-model-tp17285051p17285051.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: total records using event model

Posted by Nick Burch <ni...@torchbox.com>.
On Mon, 19 May 2008, visu wrote:
> Thank you.iam doing the same thing.i was just wondering is there any way
> to know upfront.

Nope, there's no way to tell until you've created all the records

Nick

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


Re: total records using event model

Posted by visu <sh...@yahoo.com>.
Thank you.iam doing the same thing.i was just wondering is there any way to
know upfront.

Nick Burch wrote:
> 
> On Fri, 16 May 2008, visu wrote:
>> How do i find out how many total records are in excel file while using 
>> event model.
> 
> Count them?
> 
> public class Counter implements HSSFListener {
>  	private int numRecords = 0;
>  	public void processRecord(Record record) {
>  		numRecords++;
>  	}
> }
> 
> 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://www.nabble.com/total-records-using-event-model-tp17285051p17333474.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: total records using event model

Posted by Nick Burch <ni...@torchbox.com>.
On Fri, 16 May 2008, visu wrote:
> How do i find out how many total records are in excel file while using 
> event model.

Count them?

public class Counter implements HSSFListener {
 	private int numRecords = 0;
 	public void processRecord(Record record) {
 		numRecords++;
 	}
}

Nick

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