On 22/05/13 14:19, huma seemab wrote:
Sir i just want tosave my sparql query result in excel file.
e.g. ist column contain ontology classes....and ia ma using Apache
Poi.
The Jena API gives you the result set so you can walk the structure of
rows and values in java code. After that, it's a matter of how to use
the POI API.
Andy
________________________________ From: Andy Seaborne
<[email protected]> To: [email protected] Sent: Wednesday, 22 May
2013 3:24 PM Subject: Re: problem in saving result of sparql query
in excel file
On 22/05/13 07:24, huma seemab wrote:
First i made ontology using protege.then to extract its construct
e.g.... classes,properties i use jena and sparql...now i want to
save my result in excel file...how can i do this.i try the
following code but it am not getting proper result.Kindly please
help me.
That's a lot of code and it's not clear to me what you're trying to
achieve. What is the "the proper result"?
Have you considered writing out CSV - Excel can read CSV files and
Jena writes them directly. ResultSetFormatter.outputAsCSV.
Otherwise, if you want to set Excel details like column widths and
formatting, not available in CSV, something like the commented out
code, looping over the rows and then columns of the ResultSet, is
what I'd expect.
Andy