Class XlsxSaveOptions

Class XlsxSaveOptions

Namespace: Aspose.Words.Saving
Assembly: Aspose.Words.dll (25.12.0)

Can be used to specify additional options when saving a document into the Aspose.Words.SaveFormat.Xlsx format.

To learn more, visit the Specify Save Options documentation article.

public class XlsxSaveOptions : SaveOptions

Inheritance

object SaveOptions XlsxSaveOptions

Inherited Members

SaveOptions.CreateSaveOptions(SaveFormat) , SaveOptions.CreateSaveOptions(string) , SaveOptions.SaveFormat , SaveOptions.ExportGeneratorName , SaveOptions.TempFolder , SaveOptions.PrettyFormat , SaveOptions.UseAntiAliasing , SaveOptions.UseHighQualityRendering , SaveOptions.DmlRenderingMode , SaveOptions.DmlEffectsRenderingMode , SaveOptions.ImlRenderingMode , SaveOptions.DefaultTemplate , SaveOptions.UpdateFields , SaveOptions.UpdateLastSavedTimeProperty , SaveOptions.UpdateLastPrintedProperty , SaveOptions.UpdateCreatedTimeProperty , SaveOptions.MemoryOptimization , SaveOptions.UpdateAmbiguousTextFont , SaveOptions.Dml3DEffectsRenderingMode , SaveOptions.ProgressCallback , SaveOptions.AllowEmbeddingPostScriptFonts , SaveOptions.CustomTimeZoneInfo , object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Examples

Shows how to compress XLSX document.

Document doc = new Document(MyDir + "Shape with linked chart.docx");

                                               XlsxSaveOptions xlsxSaveOptions = new XlsxSaveOptions();
                                               xlsxSaveOptions.CompressionLevel = CompressionLevel.Maximum;
                                               xlsxSaveOptions.SaveFormat = SaveFormat.Xlsx;

                                               doc.Save(ArtifactsDir + "XlsxSaveOptions.CompressXlsx.xlsx", xlsxSaveOptions);

Constructors

XlsxSaveOptions()

public XlsxSaveOptions()

Properties

CompressionLevel

Specifies the compression level used to save document. The default value is Aspose.Words.Saving.CompressionLevel.Normal.

public CompressionLevel CompressionLevel { get; set; }

Property Value

CompressionLevel

Examples

Shows how to compress XLSX document.

Document doc = new Document(MyDir + "Shape with linked chart.docx");

                                               XlsxSaveOptions xlsxSaveOptions = new XlsxSaveOptions();
                                               xlsxSaveOptions.CompressionLevel = CompressionLevel.Maximum;
                                               xlsxSaveOptions.SaveFormat = SaveFormat.Xlsx;

                                               doc.Save(ArtifactsDir + "XlsxSaveOptions.CompressXlsx.xlsx", xlsxSaveOptions);

DateTimeParsingMode

Gets or sets the mode that specifies how document text is parsed to identify date and time values. The default value is Aspose.Words.Saving.XlsxDateTimeParsingMode.UseCurrentLocale.

public XlsxDateTimeParsingMode DateTimeParsingMode { get; set; }

Property Value

XlsxDateTimeParsingMode

Examples

Shows how to specify autodetection of the date time format.

Document doc = new Document(MyDir + "Xlsx DateTime.docx");

                                                                      XlsxSaveOptions saveOptions = new XlsxSaveOptions();
                                                                      // Specify using datetime format autodetection.
                                                                      saveOptions.DateTimeParsingMode = XlsxDateTimeParsingMode.Auto;

                                                                      doc.Save(ArtifactsDir + "XlsxSaveOptions.DateTimeParsingMode.xlsx", saveOptions);

SaveFormat

Specifies the format in which the document will be saved if this save options object is used. Can only be Aspose.Words.SaveFormat.Xlsx.

public override SaveFormat SaveFormat { get; set; }

Property Value

SaveFormat

Examples

Shows how to compress XLSX document.

Document doc = new Document(MyDir + "Shape with linked chart.docx");

                                               XlsxSaveOptions xlsxSaveOptions = new XlsxSaveOptions();
                                               xlsxSaveOptions.CompressionLevel = CompressionLevel.Maximum;
                                               xlsxSaveOptions.SaveFormat = SaveFormat.Xlsx;

                                               doc.Save(ArtifactsDir + "XlsxSaveOptions.CompressXlsx.xlsx", xlsxSaveOptions);

SectionMode

Gets or sets the way how sections are handled when saving to the output XLSX document. The default value is Aspose.Words.Saving.XlsxSectionMode.MultipleWorksheets.

public XlsxSectionMode SectionMode { get; set; }

Property Value

XlsxSectionMode

Examples

Shows how to save document as a separate worksheets.

Document doc = new Document(MyDir + "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.SectionMode = XlsxSectionMode.MultipleWorksheets;

                                                               doc.Save(ArtifactsDir + "XlsxSaveOptions.SelectionMode.xlsx", xlsxSaveOptions);
 English