public class XlsxSaveOptions extends SaveOptions
SaveFormat.XLSX format.
To learn more, visit the Specify Save Options documentation article.
Examples:
Shows how to compress XLSX document.
Document doc = new Document(getMyDir() + "Shape with linked chart.docx");
XlsxSaveOptions xlsxSaveOptions = new XlsxSaveOptions();
xlsxSaveOptions.setCompressionLevel(CompressionLevel.MAXIMUM);
xlsxSaveOptions.setSaveFormat(SaveFormat.XLSX);
doc.save(getArtifactsDir() + "XlsxSaveOptions.CompressXlsx.xlsx", xlsxSaveOptions);
| Modifier and Type | Method and Description |
|---|---|
int |
getCompressionLevel()
Specifies the compression level used to save document.
|
int |
getDateTimeParsingMode()
Gets the mode that specifies how document text is parsed to identify date and time values.
|
int |
getSaveFormat()
Specifies the format in which the document will be saved if this save options object is used.
|
int |
getSectionMode()
Gets the way how sections are handled when saving to the output XLSX document.
|
void |
setCompressionLevel(int value)
Specifies the compression level used to save document.
|
void |
setDateTimeParsingMode(int value)
Sets the mode that specifies how document text is parsed to identify date and time values.
|
void |
setSaveFormat(int value)
Specifies the format in which the document will be saved if this save options object is used.
|
void |
setSectionMode(int value)
Sets the way how sections are handled when saving to the output XLSX document.
|
createSaveOptions, createSaveOptions, getAllowEmbeddingPostScriptFonts, getCustomTimeZoneInfo, getDefaultTemplate, getDml3DEffectsRenderingMode, getDmlEffectsRenderingMode, getDmlRenderingMode, getExportGeneratorName, getImlRenderingMode, getMemoryOptimization, getPrettyFormat, getProgressCallback, getTempFolder, getUpdateAmbiguousTextFont, getUpdateCreatedTimeProperty, getUpdateFields, getUpdateLastPrintedProperty, getUpdateLastSavedTimeProperty, getUseAntiAliasing, getUseHighQualityRendering, setAllowEmbeddingPostScriptFonts, setCustomTimeZoneInfo, setDefaultTemplate, setDml3DEffectsRenderingMode, setDmlEffectsRenderingMode, setDmlRenderingMode, setExportGeneratorName, setImlRenderingMode, setMemoryOptimization, setPrettyFormat, setProgressCallback, setTempFolder, setUpdateAmbiguousTextFont, setUpdateCreatedTimeProperty, setUpdateFields, setUpdateLastPrintedProperty, setUpdateLastSavedTimeProperty, setUseAntiAliasing, setUseHighQualityRenderingpublic int getSaveFormat()
SaveFormat.XLSX.
Examples:
Shows how to compress XLSX document.
Document doc = new Document(getMyDir() + "Shape with linked chart.docx");
XlsxSaveOptions xlsxSaveOptions = new XlsxSaveOptions();
xlsxSaveOptions.setCompressionLevel(CompressionLevel.MAXIMUM);
xlsxSaveOptions.setSaveFormat(SaveFormat.XLSX);
doc.save(getArtifactsDir() + "XlsxSaveOptions.CompressXlsx.xlsx", xlsxSaveOptions);
getSaveFormat in class SaveOptionsint value. The returned value is one of SaveFormat constants.public void setSaveFormat(int value)
SaveFormat.XLSX.
Examples:
Shows how to compress XLSX document.
Document doc = new Document(getMyDir() + "Shape with linked chart.docx");
XlsxSaveOptions xlsxSaveOptions = new XlsxSaveOptions();
xlsxSaveOptions.setCompressionLevel(CompressionLevel.MAXIMUM);
xlsxSaveOptions.setSaveFormat(SaveFormat.XLSX);
doc.save(getArtifactsDir() + "XlsxSaveOptions.CompressXlsx.xlsx", xlsxSaveOptions);
setSaveFormat in class SaveOptionsvalue - The corresponding int value. The value must be one of SaveFormat constants.public int getCompressionLevel()
CompressionLevel.NORMAL.
Examples:
Shows how to compress XLSX document.
Document doc = new Document(getMyDir() + "Shape with linked chart.docx");
XlsxSaveOptions xlsxSaveOptions = new XlsxSaveOptions();
xlsxSaveOptions.setCompressionLevel(CompressionLevel.MAXIMUM);
xlsxSaveOptions.setSaveFormat(SaveFormat.XLSX);
doc.save(getArtifactsDir() + "XlsxSaveOptions.CompressXlsx.xlsx", xlsxSaveOptions);
int value. The returned value is one of CompressionLevel constants.public void setCompressionLevel(int value)
CompressionLevel.NORMAL.
Examples:
Shows how to compress XLSX document.
Document doc = new Document(getMyDir() + "Shape with linked chart.docx");
XlsxSaveOptions xlsxSaveOptions = new XlsxSaveOptions();
xlsxSaveOptions.setCompressionLevel(CompressionLevel.MAXIMUM);
xlsxSaveOptions.setSaveFormat(SaveFormat.XLSX);
doc.save(getArtifactsDir() + "XlsxSaveOptions.CompressXlsx.xlsx", xlsxSaveOptions);
value - The corresponding int value. The value must be one of CompressionLevel constants.public int getSectionMode()
XlsxSectionMode.MULTIPLE_WORKSHEETS.
Examples:
Shows how to save document as a separate worksheets.
Document doc = new Document(getMyDir() + "Big document.docx");
// Each section of a document will be created as a separate worksheet.
// Use 'SingleWorksheet' to display all document on one worksheet.
XlsxSaveOptions xlsxSaveOptions = new XlsxSaveOptions();
xlsxSaveOptions.setSectionMode(XlsxSectionMode.MULTIPLE_WORKSHEETS);
doc.save(getArtifactsDir() + "XlsxSaveOptions.SelectionMode.xlsx", xlsxSaveOptions);
XlsxSectionMode constants.public void setSectionMode(int value)
XlsxSectionMode.MULTIPLE_WORKSHEETS.
Examples:
Shows how to save document as a separate worksheets.
Document doc = new Document(getMyDir() + "Big document.docx");
// Each section of a document will be created as a separate worksheet.
// Use 'SingleWorksheet' to display all document on one worksheet.
XlsxSaveOptions xlsxSaveOptions = new XlsxSaveOptions();
xlsxSaveOptions.setSectionMode(XlsxSectionMode.MULTIPLE_WORKSHEETS);
doc.save(getArtifactsDir() + "XlsxSaveOptions.SelectionMode.xlsx", xlsxSaveOptions);
value - The way how sections are handled when saving to the output XLSX document. The value must be one of XlsxSectionMode constants.public int getDateTimeParsingMode()
XlsxDateTimeParsingMode.USE_CURRENT_LOCALE.
Examples:
Shows how to specify autodetection of the date time format.
Document doc = new Document(getMyDir() + "Xlsx DateTime.docx");
XlsxSaveOptions saveOptions = new XlsxSaveOptions();
// Specify using datetime format autodetection.
saveOptions.setDateTimeParsingMode(XlsxDateTimeParsingMode.AUTO);
doc.save(getArtifactsDir() + "XlsxSaveOptions.DateTimeParsingMode.xlsx", saveOptions);
XlsxDateTimeParsingMode constants.public void setDateTimeParsingMode(int value)
XlsxDateTimeParsingMode.USE_CURRENT_LOCALE.
Examples:
Shows how to specify autodetection of the date time format.
Document doc = new Document(getMyDir() + "Xlsx DateTime.docx");
XlsxSaveOptions saveOptions = new XlsxSaveOptions();
// Specify using datetime format autodetection.
saveOptions.setDateTimeParsingMode(XlsxDateTimeParsingMode.AUTO);
doc.save(getArtifactsDir() + "XlsxSaveOptions.DateTimeParsingMode.xlsx", saveOptions);
value - The mode that specifies how document text is parsed to identify date and time values. The value must be one of XlsxDateTimeParsingMode constants.