org.jfree.workbook.io
Class XLWriter

java.lang.Object
  |
  +--org.jfree.workbook.io.XLWriter

public class XLWriter
extends java.lang.Object

This class takes a JWorkbook object and saves it to an XL compatible file format. The POI/HSSF library (http://sourceforge.net/projects/poi) is being used to achieve this. POI/HSSF doesn't have all the functions we require yet (e.g. formula support) so the .xls file will be missing some information. However, as new versions of POI/HSSF are released, this will improve.


Constructor Summary
XLWriter()
          Constructs an XLWriter.
 
Method Summary
 void saveWorkbook(JWorkbook workbook, java.lang.String filename)
          Saves the workbook in an XL compatible file format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XLWriter

public XLWriter()
Constructs an XLWriter.

Method Detail

saveWorkbook

public void saveWorkbook(JWorkbook workbook,
                         java.lang.String filename)
                  throws java.io.IOException
Saves the workbook in an XL compatible file format. This is achieved by converting the JWorkbook object to an HSSFWorkbook so that the POI/HSSF project can be used as the basis for saving to XL. For more information about POI, see http://sourceforge.net/projects/poi.

Parameters:
workbook - the workbook.
filename - the name of the file.
Throws:
java.io.IOException - if there is an I/O problem.