|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjxl.write.WritableWorkbook
jxl.write.biff.WritableWorkbookImpl
A writable workbook
| Field Summary |
| Fields inherited from class jxl.write.WritableWorkbook |
ARIAL_10_PT, HIDDEN_STYLE, HYPERLINK_FONT, HYPERLINK_STYLE, NORMAL_STYLE |
| Constructor Summary | |
WritableWorkbookImpl(java.io.OutputStream os,
boolean cs,
WorkbookSettings ws)
Constructor. |
|
WritableWorkbookImpl(java.io.OutputStream os,
Workbook w,
boolean cs,
WorkbookSettings ws)
A pseudo copy constructor. |
|
| Method Summary | |
void |
addNameArea(java.lang.String name,
WritableSheet sheet,
int firstCol,
int firstRow,
int lastCol,
int lastRow)
Add new named area to this workbook with the given information. |
void |
close()
Closes this workbook, and frees makes any memory allocated available for garbage collection |
void |
copySheet(int s,
java.lang.String name,
int index)
Copies the specified sheet and places it at the index specified by the parameter |
void |
copySheet(java.lang.String s,
java.lang.String name,
int index)
Copies the specified sheet and places it at the index specified by the parameter |
WritableSheet |
createSheet(java.lang.String name,
int index)
Creates a new sheet within the workbook, at the specified position. |
Range[] |
findByName(java.lang.String name)
Gets the named range from this workbook. |
WritableCell |
findCellByName(java.lang.String name)
Gets the named cell from this workbook. |
RGB |
getColourRGB(Colour c)
Accessor for the RGB value for the specified colour |
int |
getExternalSheetIndex(int index)
Gets the index of the external sheet for the name |
int |
getExternalSheetIndex(java.lang.String sheetName)
Gets the external sheet index for the sheet name |
java.lang.String |
getExternalSheetName(int index)
Gets the name of the external sheet specified by the index |
int |
getLastExternalSheetIndex(int index)
Gets the index of the external sheet for the name |
int |
getLastExternalSheetIndex(java.lang.String sheetName)
Gets the last external sheet index for the sheet name |
java.lang.String |
getLastExternalSheetName(int index)
Gets the name of the last external sheet specified by the index |
java.lang.String |
getName(int index)
Gets the name at the specified index |
int |
getNameIndex(java.lang.String name)
Gets the index of the name record for the name |
int |
getNumberOfSheets()
Returns the number of sheets in this workbook |
java.lang.String[] |
getRangeNames()
Gets the named ranges |
Sheet |
getReadSheet(int index)
Interface method from WorkbookMethods - gets the specified sheet within this workbook |
WritableSheet |
getSheet(int index)
Gets the specified sheet within this workbook |
WritableSheet |
getSheet(java.lang.String name)
Gets the sheet with the specified name from within this workbook |
java.lang.String[] |
getSheetNames()
Gets the sheet names |
WritableSheet[] |
getSheets()
Gets the sheets within this workbook. |
BOFRecord |
getWorkbookBof()
Parsing of formulas is only supported for a subset of the available biff version, so we need to test to see if this version is acceptable |
WritableCell |
getWritableCell(java.lang.String loc)
Returns the cell for the specified location eg. |
WritableSheet |
moveSheet(int fromIndex,
int toIndex)
Moves the specified sheet within this workbook to another index position. |
void |
removeSheet(int index)
Removes a sheet from this workbook, the other sheets indices being altered accordingly. |
void |
setColourRGB(Colour c,
int r,
int g,
int b)
Sets the RGB value for the specified colour for this workbook |
void |
setOutputFile(java.io.File fileName)
Sets a new output file. |
void |
setProtected(boolean prot)
Indicates whether or not this workbook is protected |
void |
write()
Writes out this sheet to the output file. |
| Methods inherited from class jxl.write.WritableWorkbook |
copy |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public WritableWorkbookImpl(java.io.OutputStream os,
boolean cs,
WorkbookSettings ws)
throws java.io.IOException
os - the output streamcs - TRUE if the workbook should close the output stream, FALSEws - the configuration for this workbook
otherwise
java.io.IOException
public WritableWorkbookImpl(java.io.OutputStream os,
Workbook w,
boolean cs,
WorkbookSettings ws)
throws java.io.IOException
w - the workbook to copyos - the output stream to write the data tocs - TRUE if the workbook should close the output stream, FALSEws - the configuration for this workbook
java.io.IOException| Method Detail |
public WritableSheet[] getSheets()
getSheets in class WritableWorkbookpublic java.lang.String[] getSheetNames()
getSheetNames in class WritableWorkbookpublic Sheet getReadSheet(int index)
getReadSheet in interface WorkbookMethodsindex - the zero based index of the required sheet
public WritableSheet getSheet(int index)
getSheet in class WritableWorkbookindex - the zero based index of the reQuired sheet
public WritableSheet getSheet(java.lang.String name)
getSheet in class WritableWorkbookname - the sheet name
public int getNumberOfSheets()
getNumberOfSheets in class WritableWorkbook
public void close()
throws java.io.IOException,
JxlWriteException
close in class WritableWorkbookjava.io.IOException
JxlWriteException
public void setOutputFile(java.io.File fileName)
throws java.io.IOException
setOutputFile in class WritableWorkbookfileName - the file name
java.io.IOException
public WritableSheet createSheet(java.lang.String name,
int index)
createSheet in class WritableWorkbookname - the name of the new sheetindex - the index at which to add the sheet
public void removeSheet(int index)
removeSheet in class WritableWorkbookindex - the index of the sheet to remove
public WritableSheet moveSheet(int fromIndex,
int toIndex)
moveSheet in class WritableWorkbookfromIndex - the zero based index of the reQuired sheettoIndex - the zero based index of the reQuired sheet
public void write()
throws java.io.IOException
write in class WritableWorkbookjava.io.IOException
public void copySheet(int s,
java.lang.String name,
int index)
copySheet in class WritableWorkbooks - the index of the sheet to copyname - the name of the new sheetindex - the position of the new sheet
public void copySheet(java.lang.String s,
java.lang.String name,
int index)
copySheet in class WritableWorkbooks - the name of the sheet to copyname - the name of the new sheetindex - the position of the new sheetpublic void setProtected(boolean prot)
setProtected in class WritableWorkbookprot - protected flagpublic java.lang.String getExternalSheetName(int index)
getExternalSheetName in interface ExternalSheetindex - the external sheet index
public java.lang.String getLastExternalSheetName(int index)
index - the external sheet index
public BOFRecord getWorkbookBof()
getWorkbookBof in interface ExternalSheetpublic int getExternalSheetIndex(int index)
getExternalSheetIndex in interface ExternalSheetindex - the external sheet index
public int getLastExternalSheetIndex(int index)
getLastExternalSheetIndex in interface ExternalSheetindex - the external sheet index
public int getExternalSheetIndex(java.lang.String sheetName)
getExternalSheetIndex in interface ExternalSheetsheetName -
public int getLastExternalSheetIndex(java.lang.String sheetName)
getLastExternalSheetIndex in interface ExternalSheetsheetName -
public void setColourRGB(Colour c,
int r,
int g,
int b)
setColourRGB in class WritableWorkbookc - the colour whose RGB value is to be overwrittenr - the red portion to set (0-255)g - the green portion to set (0-255)b - the blue portion to set (0-255)public RGB getColourRGB(Colour c)
public java.lang.String getName(int index)
getName in interface WorkbookMethodsindex - the index into the name table
public int getNameIndex(java.lang.String name)
getNameIndex in interface WorkbookMethodsname -
public WritableCell findCellByName(java.lang.String name)
findCellByName in class WritableWorkbookpublic Range[] findByName(java.lang.String name)
findByName in class WritableWorkbookpublic java.lang.String[] getRangeNames()
getRangeNames in class WritableWorkbook
public void addNameArea(java.lang.String name,
WritableSheet sheet,
int firstCol,
int firstRow,
int lastCol,
int lastRow)
addNameArea in class WritableWorkbookname - name to be created.sheet - sheet containing the namefirstCol - first column this name refers to.firstRow - first row this name refers to.lastCol - last column this name refers to.lastRow - last row this name refers to.public WritableCell getWritableCell(java.lang.String loc)
getWritableCell in class WritableWorkbookloc - the cell to retrieve
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||