|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jopendocument.dom.spreadsheet.SpreadSheet
public class SpreadSheet
A calc document.
| Constructor Summary | |
|---|---|
SpreadSheet(org.jdom.Document doc,
org.jdom.Document styles)
|
|
| Method Summary | |
|---|---|
Sheet |
addSheet(int index,
String name)
Adds an empty sheet. |
Sheet |
addSheet(String name)
|
static SpreadSheet |
create(ODPackage fd)
|
static SpreadSheet |
createEmpty(TableModel t)
|
static SpreadSheet |
createEmpty(TableModel t,
XMLVersion ns)
|
static SpreadSheet |
createFromFile(File f)
|
static File |
export(TableModel t,
File f,
XMLVersion ns)
Export the passed data to file. |
Cell<SpreadSheet> |
getCellAt(String ref)
Return the cell at the passed address. |
ODPackage |
getPackage()
|
Sheet |
getSheet(int i)
|
Sheet |
getSheet(String name)
|
Sheet |
getSheet(String name,
boolean mustExist)
Return the first sheet with the passed name. |
int |
getSheetCount()
|
SheetTableModel.MutableTableModel<SpreadSheet> |
getTableModel(String name)
Return a view of the passed range. |
XMLVersion |
getVersion()
|
org.jdom.xpath.XPath |
getXPath(String p)
|
protected String |
parseSheetName(String n)
|
File |
saveAs(File file)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SpreadSheet(org.jdom.Document doc,
org.jdom.Document styles)
| Method Detail |
|---|
public static SpreadSheet createFromFile(File f)
throws IOException
IOExceptionpublic static SpreadSheet create(ODPackage fd)
public static SpreadSheet createEmpty(TableModel t)
throws IOException
IOException
public static SpreadSheet createEmpty(TableModel t,
XMLVersion ns)
throws IOException
IOException
public static File export(TableModel t,
File f,
XMLVersion ns)
throws IOException
t - the data to export.f - where to export, if the extension is missing (or wrong) the correct one will be
added, eg "dir/data".ns - the version of XML.
IOException - if the file can't be saved.public final XMLVersion getVersion()
getVersion in interface ODDocumentprotected final String parseSheetName(String n)
public final SheetTableModel.MutableTableModel<SpreadSheet> getTableModel(String name)
name - a named range.
null if it doesn't exist.public final Cell<SpreadSheet> getCellAt(String ref)
ref - the full address, eg "$sheet.A12".
public org.jdom.xpath.XPath getXPath(String p)
throws org.jdom.JDOMException
org.jdom.JDOMExceptionpublic int getSheetCount()
public Sheet getSheet(int i)
public Sheet getSheet(String name)
public Sheet getSheet(String name,
boolean mustExist)
throws NoSuchElementException
name - the name of a sheet.mustExist - what to do when no match is found : true to throw an exception,
false to return null.
null if mustExist is
false and no match is found.
NoSuchElementException - if mustExist is true and no match is
found.
public final Sheet addSheet(int index,
String name)
index - where to add the new sheet.name - the name of the new sheet.
public final Sheet addSheet(String name)
public File saveAs(File file)
throws FileNotFoundException,
IOException
FileNotFoundException
IOExceptionpublic final ODPackage getPackage()
getPackage in interface ODDocument
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||