You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Chan Mei Theng <me...@pocketgroup.co.uk> on 2007/06/29 06:05:35 UTC

HSSFSerializer

Hi,

 

Kindly advise.

 

I am facing compilation error.

 

public void convert(InputStream in, OutputStream out)

        throws Exception

{

        throw new Error("Unresolved compilation problems: \n\tHSSFSerializer
cannot be resolved to a type" + "\n\tHSSFSerializer cannot be resolved to a
type\n"

);

 

Jars Used

cocoon-poi-2.1.9.jar

serializer.jar

xalan.jar

xercesImpl.jar

xml-apis.jar

xsltc.jar

 

Below is the java source code.

 

/*

 * Created on Sep 1, 2005

 */

 

import java.io.FileInputStream;

import java.io.FileNotFoundException;

import java.io.FileOutputStream;

import java.io.IOException;

import java.io.InputStream;

import java.io.OutputStream;

 

// import net.sourceforge.poi.serialization.HSSFSerializer;

import org.apache.cocoon.serialization.HSSFSerializer;

import java.io.*;

import javax.xml.parsers.*;

import org.xml.sax.*;

 

import org.xml.sax.*;

import org.w3c.dom.*;

import org.apache.xalan.xslt.*;

 

 

/**

 * converts an xml stream into an xls stream

 * @author wohlgemuth

 *

 */

public class XML2XLSConverter {

    /**

     * converts an input XML file to an xls file

     * 

     * @throws Exception

     * 

     * @see
edu.ucdavis.genomics.metabolomics.binbase.meta.converter.AbstractConverter#c
onvert(java.io.InputStream,

     *      java.io.OutputStream)

     */

    public void convert(InputStream in, OutputStream out) throws Exception {

                org.apache.cocoon.serialization.HSSFSerializer
hssfSerializer = new org.apache.cocoon.serialization.HSSFSerializer();

                                hssfSerializer.setOutputStream (new
FileOutputStream ("result.xls"));

 

                                XMLReader reader =
SAXParserFactory.newInstance().newSAXParser().getXMLReader();

                                reader.setContentHandler (hssfSerializer);

                                reader.parse (new InputSource (new
FileInputStream ("gnumeric.xml")));

    }

 

 

                /**

     * 

     */

    public XML2XLSConverter() {

        super();

    }

    

    public static void main(String[] args) throws FileNotFoundException,
Exception {

        new XML2XLSConverter().convert(new FileInputStream(args[0]),new
FileOutputStream(args[1]));

    }

 

}

 

 

Thanks & Regards

 




Chan Mei Theng
Technical Developer


m: +6012 488 4484


t: +603 2163 7233


f: +603 2163 8233


 <ma...@pocketgroup.co.uk> meitheng@pocketgroup.co.uk


 <http://www.pocketgroup.co.uk/> www.pocketgroup.co.uk


skype ID: mtchan48

 





Experts in mobile content and services 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


Re: HSSFSerializer

Posted by Antonio Gallardo <ag...@agssa.net>.
Chan Mei Theng escribió:
> You mean this ...
> cocoon-users@cocoon.apache.org
>
>   
is "users" instead of "cocoon-user" on the above mail address.

Best Regards,

Antonio Gallardo

RE: HSSFSerializer

Posted by Chan Mei Theng <me...@pocketgroup.co.uk>.
You mean this ...
cocoon-users@cocoon.apache.org

Thanks & Regards
 
Chan Mei Theng
Technical Developer
m: +6012 488 4484
t: +603 2163 7233
f: +603 2163 8233
meitheng@pocketgroup.co.uk
www.pocketgroup.co.uk
skype ID: mtchan48
 

Experts in mobile content and services 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
-----Original Message-----
From: news [mailto:news@sea.gmane.org] On Behalf Of Olivier Billard
Sent: Friday, June 29, 2007 5:02 PM
To: dev@cocoon.apache.org
Subject: Re: HSSFSerializer

Hi Chan,

This question should be asked in the cocoon-users mailing list.
Regards,

-- Olivier Billard



Chan Mei Theng wrote:
> Hi,
> 
>  
> 
> Kindly advise.
> 
>  
> 
> I am facing compilation error.
> 
>  
> 
> public void convert(InputStream in, OutputStream out)
> 
>         throws Exception
> 
> {
> 
>         throw new Error("Unresolved compilation problems: 
> \n\tHSSFSerializer cannot be resolved to a type" + "\n\tHSSFSerializer 
> cannot be resolved to a type\n"
> 
> );
> 
>  
> 
> Jars Used
> 
> cocoon-poi-2.1.9.jar
> 
> serializer.jar
> 
> xalan.jar
> 
> xercesImpl.jar
> 
> xml-apis.jar
> 
> xsltc.jar
> 
>  
> 
> Below is the java source code.
> 
>  
> 
> /*
> 
>  * Created on Sep 1, 2005
> 
>  */
> 
>  
> 
> import java.io.FileInputStream;
> 
> import java.io.FileNotFoundException;
> 
> import java.io.FileOutputStream;
> 
> import java.io.IOException;
> 
> import java.io.InputStream;
> 
> import java.io.OutputStream;
> 
>  
> 
> // import net.sourceforge.poi.serialization.HSSFSerializer;
> 
> import org.apache.cocoon.serialization.HSSFSerializer;
> 
> import java.io.*;
> 
> import javax.xml.parsers.*;
> 
> import org.xml.sax.*;
> 
>  
> 
> import org.xml.sax.*;
> 
> import org.w3c.dom.*;
> 
> import org.apache.xalan.xslt.*;
> 
>  
> 
>  
> 
> /**
> 
>  * converts an xml stream into an xls stream
> 
>  * @author wohlgemuth
> 
>  *
> 
>  */
> 
> public class XML2XLSConverter {
> 
>     /**
> 
>      * converts an input XML file to an xls file
> 
>      *
> 
>      * @throws Exception
> 
>      *
> 
>      * @see 
>
edu.ucdavis.genomics.metabolomics.binbase.meta.converter.AbstractConverter#c
onvert(java.io.InputStream,
> 
>      *      java.io.OutputStream)
> 
>      */
> 
>     public void convert(InputStream in, OutputStream out) throws Exception
{
> 
>                 org.apache.cocoon.serialization.HSSFSerializer 
> hssfSerializer = new org.apache.cocoon.serialization.HSSFSerializer();
> 
>                                 hssfSerializer.setOutputStream (new 
> FileOutputStream ("result.xls"));
> 
>  
> 
>                                 XMLReader reader = 
> SAXParserFactory.newInstance().newSAXParser().getXMLReader();
> 
>                                 reader.setContentHandler (hssfSerializer);
> 
>                                 reader.parse (new InputSource (new 
> FileInputStream ("gnumeric.xml")));
> 
>     }
> 
>  
> 
>  
> 
>                 /**
> 
>      *
> 
>      */
> 
>     public XML2XLSConverter() {
> 
>         super();
> 
>     }
> 
>    
> 
>     public static void main(String[] args) throws FileNotFoundException, 
> Exception {
> 
>         new XML2XLSConverter().convert(new FileInputStream(args[0]),new 
> FileOutputStream(args[1]));
> 
>     }
> 
>  
> 
> }
> 
>  
> 
>  
> 
> Thanks & Regards
> 
>  
> 
> **Chan Mei ***Theng*
> /Technical Developer/
> 
> **m: +6012 488 4484**
> 
> t: +603 2163 7233
> 
> f: +603 2163 8233
> 
> meitheng@pocketgroup.co.uk <ma...@pocketgroup.co.uk>
> 
> www.pocketgroup.co.uk <http://www.pocketgroup.co.uk/>
> 
> skype ID: mtchan48
> 
>  
> 
> *Experts in mobile content and services ***
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 



-- 
No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.476 / Virus Database: 269.9.12/878 - Release Date: 6/28/2007
5:57 PM



Re: HSSFSerializer

Posted by Olivier Billard <ol...@laposte.net>.
Hi Chan,

This question should be asked in the cocoon-users mailing list.
Regards,

-- Olivier Billard



Chan Mei Theng wrote:
> Hi,
> 
>  
> 
> Kindly advise.
> 
>  
> 
> I am facing compilation error.
> 
>  
> 
> public void convert(InputStream in, OutputStream out)
> 
>         throws Exception
> 
> {
> 
>         throw new Error("Unresolved compilation problems: 
> \n\tHSSFSerializer cannot be resolved to a type" + "\n\tHSSFSerializer 
> cannot be resolved to a type\n"
> 
> );
> 
>  
> 
> Jars Used
> 
> cocoon-poi-2.1.9.jar
> 
> serializer.jar
> 
> xalan.jar
> 
> xercesImpl.jar
> 
> xml-apis.jar
> 
> xsltc.jar
> 
>  
> 
> Below is the java source code.
> 
>  
> 
> /*
> 
>  * Created on Sep 1, 2005
> 
>  */
> 
>  
> 
> import java.io.FileInputStream;
> 
> import java.io.FileNotFoundException;
> 
> import java.io.FileOutputStream;
> 
> import java.io.IOException;
> 
> import java.io.InputStream;
> 
> import java.io.OutputStream;
> 
>  
> 
> // import net.sourceforge.poi.serialization.HSSFSerializer;
> 
> import org.apache.cocoon.serialization.HSSFSerializer;
> 
> import java.io.*;
> 
> import javax.xml.parsers.*;
> 
> import org.xml.sax.*;
> 
>  
> 
> import org.xml.sax.*;
> 
> import org.w3c.dom.*;
> 
> import org.apache.xalan.xslt.*;
> 
>  
> 
>  
> 
> /**
> 
>  * converts an xml stream into an xls stream
> 
>  * @author wohlgemuth
> 
>  *
> 
>  */
> 
> public class XML2XLSConverter {
> 
>     /**
> 
>      * converts an input XML file to an xls file
> 
>      *
> 
>      * @throws Exception
> 
>      *
> 
>      * @see 
> edu.ucdavis.genomics.metabolomics.binbase.meta.converter.AbstractConverter#convert(java.io.InputStream,
> 
>      *      java.io.OutputStream)
> 
>      */
> 
>     public void convert(InputStream in, OutputStream out) throws Exception {
> 
>                 org.apache.cocoon.serialization.HSSFSerializer 
> hssfSerializer = new org.apache.cocoon.serialization.HSSFSerializer();
> 
>                                 hssfSerializer.setOutputStream (new 
> FileOutputStream ("result.xls"));
> 
>  
> 
>                                 XMLReader reader = 
> SAXParserFactory.newInstance().newSAXParser().getXMLReader();
> 
>                                 reader.setContentHandler (hssfSerializer);
> 
>                                 reader.parse (new InputSource (new 
> FileInputStream ("gnumeric.xml")));
> 
>     }
> 
>  
> 
>  
> 
>                 /**
> 
>      *
> 
>      */
> 
>     public XML2XLSConverter() {
> 
>         super();
> 
>     }
> 
>    
> 
>     public static void main(String[] args) throws FileNotFoundException, 
> Exception {
> 
>         new XML2XLSConverter().convert(new FileInputStream(args[0]),new 
> FileOutputStream(args[1]));
> 
>     }
> 
>  
> 
> }
> 
>  
> 
>  
> 
> Thanks & Regards
> 
>  
> 
> **Chan Mei ***Theng*
> /Technical Developer/
> 
> **m: +6012 488 4484**
> 
> t: +603 2163 7233
> 
> f: +603 2163 8233
> 
> meitheng@pocketgroup.co.uk <ma...@pocketgroup.co.uk>
> 
> www.pocketgroup.co.uk <http://www.pocketgroup.co.uk/>
> 
> skype ID: mtchan48
> 
>  
> 
> *Experts in mobile content and services ***
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
>