Nick Burch wrote:
On Tue, 5 May 2009, Chris Lott wrote:
Hi, I'm writing to report a small documentation problem in the class org.apache.poi.hssf.eventusermodel.AbortableHSSFListener

I've fixed the docs, and added a unit test that shows it all works just fine

Nick

Thanks for checking that this works. I think I found the problem. I am still working with the XLS2CSV example from here

http://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/hssf/eventusermodel/examples/XLS2CSVmra.java

I am extending it to read just the first row of an Excel sheet. In this example, the user implementation of HSSFListener is wrapped inside a MissingRecordAwareHSSFListener, which in turn is wrapped inside a FormatTrackingHSSFListener. The dummy end-of-row record provided by the MissingRecordAwareHSSFListener is really helpful, and the formatting assistance provided by the FormatTrackingHSSFListener is *also* really helpful. But those two listeners don't seem to be aware of the abortable notion. I revised the implementation so it extends AbortableHSSFListener (instead of implementing HSSFListener), but the two wrapper listeners don't call abortableProcessRecord. Instead they call just plain old processRecord. At first glance there seems no way for me to reuse all this great stuff and still get the message back up to the loop. I am trying to figure out a way around this issue. Thanks for listening.

chris...

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to