org.odftoolkit.odfdom.doc
Class OdfSpreadsheetDocument

java.lang.Object
  extended by org.odftoolkit.odfdom.doc.OdfDocument
      extended by org.odftoolkit.odfdom.doc.OdfSpreadsheetDocument

public class OdfSpreadsheetDocument
extends OdfDocument

This class represents an empty ODF spreadsheet document.


Nested Class Summary
static class OdfSpreadsheetDocument.OdfMediaType
          This enum contains all possible media types of OdfSpreadsheetDocument documents.
 
Nested classes/interfaces inherited from class org.odftoolkit.odfdom.doc.OdfDocument
OdfDocument.OdfXMLFile, OdfDocument.Resource
 
Constructor Summary
protected OdfSpreadsheetDocument()
           
 
Method Summary
 void changeMode(OdfSpreadsheetDocument.OdfMediaType type)
          Switches this instance to the given type.
 OdfOfficeSpreadsheet getContentRoot()
          Get the content root of a spreadsheet document.
static OdfSpreadsheetDocument newSpreadsheetDocument()
          Creates an empty spreadsheet document.
static OdfSpreadsheetDocument newSpreadsheetTemplateDocument()
          Creates an empty spreadsheet template.
 
Methods inherited from class org.odftoolkit.odfdom.doc.OdfDocument
close, embedDocument, getBaseURI, getContentDom, getContentStream, getDocumentPackagePath, getDocumentStyles, getEmbeddedDocument, getEmbeddedDocuments, getEmbeddedDocuments, getMediaType, getMetaDom, getMetaStream, getOfficeBody, getOfficeMasterStyles, getOfficeMetadata, getOrCreateDocumentStyles, getPackage, getRootDocument, getSettingsStream, getStylesDom, getStylesStream, getTableByName, getTableList, getXMLFilePath, getXPath, loadDocument, loadDocument, loadDocument, loadDocument, loadTemplate, newImage, RemoveEmbedDocument, save, save, save, setMediaType, setPackage, setRootDocument, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OdfSpreadsheetDocument

protected OdfSpreadsheetDocument()
Method Detail

newSpreadsheetDocument

public static OdfSpreadsheetDocument newSpreadsheetDocument()
                                                     throws java.lang.Exception
Creates an empty spreadsheet document.

Returns:
ODF spreadsheet document based on a default template*
Throws:
java.lang.Exception - - if the document could not be created

newSpreadsheetTemplateDocument

public static OdfSpreadsheetDocument newSpreadsheetTemplateDocument()
                                                             throws java.lang.Exception
Creates an empty spreadsheet template.

Returns:
ODF spreadsheet template based on a default
Throws:
java.lang.Exception - - if the template could not be created

getContentRoot

public OdfOfficeSpreadsheet getContentRoot()
                                    throws java.lang.Exception
Get the content root of a spreadsheet document.

Returns:
content root, representing the office:spreadsheet tag
Throws:
java.lang.Exception - if the file DOM could not be created.

changeMode

public void changeMode(OdfSpreadsheetDocument.OdfMediaType type)
Switches this instance to the given type. This method can be used to e.g. convert a document instance to a template and vice versa.

Parameters:
type -


Copyright © 2008-2010 ODF Toolkit Project. All Rights Reserved.