jxl.demo
Class ReadWrite
java.lang.Object
|
+--jxl.demo.ReadWrite
- public class ReadWrite
- extends java.lang.Object
Demo class which uses the api to read in a spreadsheet and generate a clone
of that spreadsheet which contains the same data. If the spreadsheet read
in is the spreadsheet called jxlrwtest.xls (provided with the distribution)
then this class will modify certain fields in the copy of that spreadsheet.
This is illustrating that it is possible to read in a spreadsheet, modify
a few values, and write it under a new name.
Field Summary |
private java.io.File |
inputWorkbook
The spreadsheet to read in |
private java.io.File |
outputWorkbook
The spreadsheet to output |
Constructor Summary |
ReadWrite(java.lang.String input,
java.lang.String output)
Constructor |
Method Summary |
private void |
modify(WritableWorkbook w)
If the inputFile was the test spreadsheet, then it modifies certain fields
of the writable copy |
void |
readWrite()
Reads in the inputFile and creates a writable copy of it called outputFile |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
inputWorkbook
private java.io.File inputWorkbook
- The spreadsheet to read in
outputWorkbook
private java.io.File outputWorkbook
- The spreadsheet to output
ReadWrite
public ReadWrite(java.lang.String input,
java.lang.String output)
- Constructor
- Parameters:
output
- input
-
readWrite
public void readWrite()
throws java.io.IOException,
BiffException
- Reads in the inputFile and creates a writable copy of it called outputFile
- Throws:
java.io.IOException
- BiffException
-
modify
private void modify(WritableWorkbook w)
- If the inputFile was the test spreadsheet, then it modifies certain fields
of the writable copy
- Parameters:
w
-