Home  Products  Purchase  Downloads  Demos  Forums  Blogs  Ticket  Wiki  API  Corporate


com.aspose.cells
Class SaveOptions

java.lang.Object
  extended by com.aspose.cells.SaveOptions

public class SaveOptions
extends java.lang.Object

Provides various options that control how a workbook is saved.


Method Summary
 java.lang.String getEncoding()
          Gets the name of the character encoding being used.
 ExportObjectListener getExportObjectListener()
          Gets the ExportObjectListener to receive ExportObjectEvent.
 java.lang.String[] getFontPath()
          Gets the font path(a list of directories containing fonts.
 java.lang.String getHtmlExportImagesFolder()
          Gets the physical folder where images are saved when exporting to HTML format.
 java.lang.String getHtmlExportImagesFolderAlias()
          Gets the name of the folder used to construct image URIs written into an HTML file.
 ImageOptions getImageOptions()
          Gets the settings for generating Images.
 boolean getOnePagePerSheet()
          Checks whether render one sheet in one pdf page.
 java.lang.String getOpenDocumentVersion()
          Gets the version of Open Document.
 PdfBookmarkEntry getPdfBookmarkEntry()
          Gets pdf bookmark.
 byte getPdfCompliance()
          Gets the compliance for PDF convertion.
 boolean isDisplayHTMLCrossString()
          Checks whether a cross-cell string will be displayed in the same way as MS Excel when saving an Excel file in html format.
 boolean isForMac()
          Check whether the workbook will be saved for Mac OS.
 void setDisplayHTMLCrossString(boolean value)
          Sets whether a cross-cell string will be displayed in the same way as MS Excel when saving an Excel file in html format.
 void setEncoding(java.lang.String encoding)
          Sets the name of the character encoding being used.
 void setExportObjectListener(ExportObjectListener newListener)
          Sets the ExportObjectListener to receive ExportObjectEvent.
 void setFontPath(java.lang.String[] arrFontPath)
          Sets the font path(a list of directories containing fonts.
 void setForMac(boolean isForMac)
          Sets whether the workbook will be saved for Mac OS.
 void setHtmlExportImagesFolder(java.lang.String value)
          Sets the physical folder where images are saved when exporting to HTML format.
 void setHtmlExportImagesFolderAlias(java.lang.String value)
          Sets the name of the folder used to construct image URIs written into an HTML file.
 void setOnePagePerSheet(boolean value)
          Sets whether render one sheet in one pdf page.
 void setOpenDocumentVersion(java.lang.String version)
          Sets the version of Open Document when saving ODS file.
 void setPdfBookmarkEntry(PdfBookmarkEntry entry)
          Sets pdf bookmark.
 void setPdfCompliance(byte compliance)
          Sets the compliance for PDF convertion.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getFontPath

public java.lang.String[] getFontPath()
Gets the font path(a list of directories containing fonts. For example, it is commonly C:\Windows\fonts for Windows OS).
The font path can be set by setFontPath(String[]). Also it can be set globally by the system property with key "Aspose.Cells.FontPath". For the system property "Aspose.Cells.FontPath", the value should be a font path list string with system-dependent path-separator character.

Returns:
font path list.

setFontPath

public void setFontPath(java.lang.String[] arrFontPath)
Sets the font path(a list of directories containing fonts. For example, it is commonly C:\Windows\fonts for Windows OS).

Parameters:
arrFontPath - font path list.

getHtmlExportImagesFolder

public java.lang.String getHtmlExportImagesFolder()
Gets the physical folder where images are saved when exporting to HTML format. Default is null.

Returns:
the physical folder where images are saved.

setHtmlExportImagesFolder

public void setHtmlExportImagesFolder(java.lang.String value)
Sets the physical folder where images are saved when exporting to HTML format. Default is null.

Parameters:
value - the physical folder where images are saved.

getHtmlExportImagesFolderAlias

public java.lang.String getHtmlExportImagesFolderAlias()
Gets the name of the folder used to construct image URIs written into an HTML file. Default is null.

Returns:
the name of the folder used to construct image URIs.

setHtmlExportImagesFolderAlias

public void setHtmlExportImagesFolderAlias(java.lang.String value)
Sets the name of the folder used to construct image URIs written into an HTML file. Default is null.

Parameters:
value - the name of the folder used to construct image URIs.

getExportObjectListener

public ExportObjectListener getExportObjectListener()
Gets the ExportObjectListener to receive ExportObjectEvent.

Returns:
the ExportObjectEvent's handler.

setExportObjectListener

public void setExportObjectListener(ExportObjectListener newListener)
Sets the ExportObjectListener to receive ExportObjectEvent.

Parameters:
newListener - the new ExportObjectListener. null to remove current listener.

isDisplayHTMLCrossString

public boolean isDisplayHTMLCrossString()
Checks whether a cross-cell string will be displayed in the same way as MS Excel when saving an Excel file in html format. By default the value is false. So for cross-cell strings, there is little difference between the html files created by Aspose.Cells and MS Excel. But the performance for creating large html files will be faster than setting the value to true.

Returns:
whether a cross-cell string will be displayed.

setDisplayHTMLCrossString

public void setDisplayHTMLCrossString(boolean value)
Sets whether a cross-cell string will be displayed in the same way as MS Excel when saving an Excel file in html format. If the value is true, the performance for creating large html files will be slower than setting the value to false.

Parameters:
value - whether a cross-cell string will be displayed.

getImageOptions

public ImageOptions getImageOptions()
Gets the settings for generating Images. The settings may be used when converting Charts to images such as when exporting Pdf file.

Returns:
the settings for generating Images.

getOnePagePerSheet

public boolean getOnePagePerSheet()
Checks whether render one sheet in one pdf page.

Returns:
true if render one sheet in one pdf page, otherwise false.

setOnePagePerSheet

public void setOnePagePerSheet(boolean value)
Sets whether render one sheet in one pdf page.

Parameters:
value - whether render one sheet in one pdf page.

getPdfBookmarkEntry

public PdfBookmarkEntry getPdfBookmarkEntry()
Gets pdf bookmark.

Returns:
pdf bookmark

setPdfBookmarkEntry

public void setPdfBookmarkEntry(PdfBookmarkEntry entry)
Sets pdf bookmark.

Parameters:
entry - pdf bookmark

getPdfCompliance

public byte getPdfCompliance()
Gets the compliance for PDF convertion.

Returns:
compliance for PDF convertion.

setPdfCompliance

public void setPdfCompliance(byte compliance)
Sets the compliance for PDF convertion.

Parameters:
compliance - compliance for PDF convertion.

isForMac

public boolean isForMac()
Check whether the workbook will be saved for Mac OS.

Returns:
true if the workbook will be saved for Mac OS.

setForMac

public void setForMac(boolean isForMac)
Sets whether the workbook will be saved for Mac OS. For the excel of Mac OS(such as office 2008), there are some special limits. Such as the colors of Chart, If there are duplicated colors in the palette, the color of Chart should use the prior one, otherwise the color will be shown as black.

Parameters:
isForMac - whether the workbook will be saved for Mac OS.

getOpenDocumentVersion

public java.lang.String getOpenDocumentVersion()
Gets the version of Open Document.

Returns:
the version of Open Document.

setOpenDocumentVersion

public void setOpenDocumentVersion(java.lang.String version)
Sets the version of Open Document when saving ODS file.

Parameters:
version - version of Open Document, can only be 1.1 or 1.2 currently.

getEncoding

public java.lang.String getEncoding()
Gets the name of the character encoding being used.

Returns:
the name of the character encoding being used.

setEncoding

public void setEncoding(java.lang.String encoding)
Sets the name of the character encoding being used. For saving text format template file such as CSV, TAB_DELIMITED, HTML.

Parameters:
encoding - the name of the character encoding being used. null will set the encoding to the default of System.