Site icon k5n.us

Jxmlss

About jxmlss

The jxmlss toolkit is a Java-based toolkit for generating files in SpreadsheetML format (compatible with MS Excel). This toolkit was designed specifically to be packaged with a signed applet and is less than 10kb in size.

Project Goals

The jxmlss tool was designed with the following goals:

Licensing

All software is licensed under the GNU Lesser General Public License.

Tutorial

The jxmlss interface is very simple to use. Basically, you create a Document object and add one or more Worksheet objects to it. Each Worksheet should have Row objects added to it. When you’re done, invoke the Document.toXMLSS() method.

A Simple Example:

 public void SimpleTest ()
  {
    Document d = new us.k5n.jxmlss.Document ();
    d.setTitle ( "Example 1" );
    d.setSubject ( "Example 1 Subject" );
    d.setDescription ( "Example 1 File For Testing" );
    d.setAuthor ( "Joe Schmoe" );
    d.setKeywords ( "Microsoft, Excel, k5n.us, Java" );
    Worksheet worksheet = new Worksheet ( "Worksheet 1" );
    Row header = new Row ();
    header.addCell ( "" ); // blank
    header.addCell ( "Value 1" );
    header.addCell ( "Value 2" );
    header.addCell ( "Value 3" );
    header.addCell ( "Property 1" );
    worksheet.addRow ( header );

    Row row = new Row ();
    row.addCell ( "Item 1" ); row.addCell ( new Float ( 0.97 ) );
    row.addCell ( new Float ( 10097 ) ); row.addCell ( new Integer ( 37 ) );
    worksheet.addRow ( row );

    row = new Row ();
    row.addCell ( "Item 2" ); row.addCell ( new Float ( 21.97 ) );
    row.addCell ( new Integer ( 447 ) );
    row.addCell ( new Float ( 432.333 ) );
    worksheet.addRow ( row );

    d.addWorksheet ( worksheet );

    String outputString = d.toXMLSS();
    // You would likely write the output to a file here...
  }

Download

Download version 1.0.0 below:

k5n-jxmlss-1.0.0.jar [4k] 
k5n-jxmlss-src-1.0.0.zip [10k] 

Developer Resources

Similar Tools

Exit mobile version