You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Pierre-Yves <pi...@pingoured.fr> on 2009/01/07 13:48:05 UTC

Documentation and fetchSheetParser

Dear list,

I am a new user of the poi project, trying to use the hssf and xssf to 
read excel sheet.

I am trying to run some demo code and I took some code from the page :
http://poi.apache.org/spreadsheet/how-to.html
(paragraph "XSSF and SAX (Event API)")

The part of code I am testing is:
#--------------------------------#
String filename = "/home/pingou/Desktop/2003/2003.xls";

Package pkg = Package.open(filename);
XSSFReader r = new XSSFReader( pkg );
SharedStringsTable sst = r.getSharedStringsTable();

XMLReader parser = fetchSheetParser(sst);
#--------------------------------#

Using netbeans I can not compile because of the line:
"XMLReader parser = fetchSheetParser(sst);"

Thus I was wondering if I missed something or if the code in this page 
is not up to date (google does not return me a lot of results for 
fetchSheetParser)

Thanks in advance for your help,

Best regards,

Pierre


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


Re: Documentation and fetchSheetParser

Posted by Pierre-Yves <pi...@pingoured.fr>.
Pierre-Yves wrote:
> Dear list,
> 
> I am a new user of the poi project, trying to use the hssf and xssf to 
> read excel sheet.
> 
> I am trying to run some demo code and I took some code from the page :
> http://poi.apache.org/spreadsheet/how-to.html
> (paragraph "XSSF and SAX (Event API)")
> 
> The part of code I am testing is:
> #--------------------------------#
> String filename = "/home/pingou/Desktop/2003/2003.xls";
> 
> Package pkg = Package.open(filename);
> XSSFReader r = new XSSFReader( pkg );
> SharedStringsTable sst = r.getSharedStringsTable();
> 
> XMLReader parser = fetchSheetParser(sst);
> #--------------------------------#
> 
> Using netbeans I can not compile because of the line:
> "XMLReader parser = fetchSheetParser(sst);"

Please ignore my huge stupidity... (the method is in the class)

/me goes to hide in a small and dark corner

Regards,

Pierre

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


Re: Documentation and fetchSheetParser

Posted by Anthony Andrews <py...@yahoo.com>.
Hello Pierre-Yves

How much of the code did you copy from that example?

I only ask because the fetchSheetParser() method is an instance method of the ExampleEventUserModel class that you can find in the 'XSSF and SAX (Event API)' section on the page you mentioned. It is not, at least as far as I am aware, a part of the API, but part of an example of how to use the API. All you need to do is go back to that web page and copy the code - it creates an XMLParser, sets it's content handler and returns the reference to you.

Good luck, and let us know how you get on with POI.

--- On Wed, 1/7/09, Pierre-Yves <pi...@pingoured.fr> wrote:
From: Pierre-Yves <pi...@pingoured.fr>
Subject: Documentation and fetchSheetParser
To: user@poi.apache.org
Date: Wednesday, January 7, 2009, 4:48 AM

Dear list,

I am a new user of the poi project, trying to use the hssf and xssf to read
excel sheet.

I am trying to run some demo code and I took some code from the page :
http://poi.apache.org/spreadsheet/how-to.html
(paragraph "XSSF and SAX (Event API)")

The part of code I am testing is:
#--------------------------------#
String filename = "/home/pingou/Desktop/2003/2003.xls";

Package pkg = Package.open(filename);
XSSFReader r = new XSSFReader( pkg );
SharedStringsTable sst = r.getSharedStringsTable();

XMLReader parser = fetchSheetParser(sst);
#--------------------------------#

Using netbeans I can not compile because of the line:
"XMLReader parser = fetchSheetParser(sst);"

Thus I was wondering if I missed something or if the code in this page is not
up to date (google does not return me a lot of results for fetchSheetParser)

Thanks in advance for your help,

Best regards,

Pierre


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