jxl.demo
Class XML
java.lang.Object
|
+--jxl.demo.XML
- public class XML
- extends java.lang.Object
Simple demo class which uses the api to present the contents
of an excel 97 spreadsheet as an XML document, using a workbook
and output stream of your choice
Field Summary |
private java.lang.String |
encoding
The encoding to write |
private java.io.OutputStream |
out
The output stream to write to |
private Workbook |
workbook
The workbook we are reading from |
Constructor Summary |
XML(Workbook w,
java.io.OutputStream out,
java.lang.String enc,
boolean f)
Constructor |
Method Summary |
private void |
writeFormattedXML()
Writes out the workbook data as XML, with formatting information |
private void |
writeXML()
Writes out the workbook data as XML, without formatting information |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
out
private java.io.OutputStream out
- The output stream to write to
encoding
private java.lang.String encoding
- The encoding to write
workbook
private Workbook workbook
- The workbook we are reading from
XML
public XML(Workbook w,
java.io.OutputStream out,
java.lang.String enc,
boolean f)
throws java.io.IOException
- Constructor
- Parameters:
w
- The workbook to interrogateout
- The output stream to which the XML values are writtenenc
- The encoding used by the output stream. Null or
unrecognized values cause the encoding to default to UTF8f
- Indicates whether the generated XML document should contain
the cell format information- Throws:
java.io.IOException
-
writeXML
private void writeXML()
throws java.io.IOException
- Writes out the workbook data as XML, without formatting information
writeFormattedXML
private void writeFormattedXML()
throws java.io.IOException
- Writes out the workbook data as XML, with formatting information