GemBox.Spreadsheet
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    XlsxSaveOptions Class

    Namespace:
    GemBox.Spreadsheet
    Assembly:
    GemBox.Spreadsheet.dll

    Represent options for saving to XLSX file format (Microsoft Excel Open XML Spreadsheet; Excel 2007 and later).

    • C#
    • VB.NET
    public sealed class XlsxSaveOptions : SaveOptions
    Public NotInheritable Class XlsxSaveOptions
        Inherits SaveOptions
    Inheritance:
    Object
    SaveOptions
    XlsxSaveOptions

    Constructors

    XlsxSaveOptions()

    Initializes a new instance of the XlsxSaveOptions class.

    • C#
    • VB.NET
    public XlsxSaveOptions()
    Public Sub New

    Properties

    ContentType

    Gets the content-type for XLSX file format:

    • application/vnd.openxmlformats-officedocument.spreadsheetml.sheet if Type is Xlsx,
    • application/vnd.ms-excel.sheet.macroenabled.12 if Type is Xlsm,
    • application/vnd.openxmlformats-officedocument.spreadsheetml.template if Type is Xltx,
    • application/vnd.ms-excel.template.macroenabled.12 if Type is Xltm.
    • C#
    • VB.NET
    public override string ContentType { get; }
    Public Overrides ReadOnly Property ContentType As String
    Property Value
    String

    The content-type for XLSX file format.

    Overrides
    SaveOptions.ContentType

    DigitalSignatures

    Gets the digital signature options.

    • C#
    • VB.NET
    public IList<XlsxDigitalSignatureSaveOptions> DigitalSignatures { get; }
    Public ReadOnly Property DigitalSignatures As IList(Of XlsxDigitalSignatureSaveOptions)
    Property Value
    IList<XlsxDigitalSignatureSaveOptions>

    The digital signature options.

    EnableZip64

    Gets or sets a value indicating whether to use ZIP64 extensions when saving an XLSX file.

    • C#
    • VB.NET
    public bool EnableZip64 { get; set; }
    Public Property EnableZip64 As Boolean
    Property Value
    Boolean

    ImageDpi

    Gets or sets the saved images DPI.

    • C#
    • VB.NET
    public int ImageDpi { get; set; }
    Public Property ImageDpi As Integer
    Property Value
    Int32

    The saved images DPI.

    Remarks

    This property controls the image quality for all images in the file. Larger value results in better-quality images but increases the file size. Setting this property to 0 will disable image optimization. Standard DPI values are:

    • 330 - Good quality for HD displays
    • 220 - Good quality for most printers and displays
    • 150 - Good quality for web pages and projectors
    • 96 - Good quality for smaller file sizes

    Limitations

    Gets limitations for saving to XLSX file format.

    • C#
    • VB.NET
    public override FileFormatLimitations Limitations { get; }
    Public Overrides ReadOnly Property Limitations As FileFormatLimitations
    Property Value
    FileFormatLimitations
    Overrides
    SaveOptions.Limitations
    Remarks

    These are the limits:

    • MaxRows: 1048576
    • MaxColumns: 16384
    • MaxColors: 16000000
    • MaxCellStyles: 64000

    Password

    Gets or sets the password used to protect / encrypt the workbook.

    • C#
    • VB.NET
    public string Password { get; set; }
    Public Property Password As String
    Property Value
    String

    Type

    Specifies type of generated file. Set this property only if you want to override default type.

    • C#
    • VB.NET
    public XlsxType? Type { get; set; }
    Public Property Type As XlsxType?
    Property Value
    Nullable<XlsxType>

    Events

    ProgressChanged

    Occurs when the saving progress of a file has changed.

    • C#
    • VB.NET
    public event EventHandler<OperationProgressChangedEventArgs> ProgressChanged
    Public Event ProgressChanged As EventHandler(Of OperationProgressChangedEventArgs)
    Event Type
    EventHandler<OperationProgressChangedEventArgs>
    Remarks

    The file path or stream that was provided as a file destination is used as a UserState.

    Inherited Properties

    CsvDefault

    Gets the default options for saving to Character Separated Values file format.

    (Inherited from SaveOptions)

    HtmlDefault

    Gets the default options for saving to HyperText Markup Language File format.

    (Inherited from SaveOptions)

    ImageDefault

    Gets the default options for saving to image formats.

    (Inherited from SaveOptions)

    OdsDefault

    Gets the default options for saving to OpenDocument Spreadsheet file format.

    (Inherited from SaveOptions)

    PdfDefault

    Gets the default options for saving to Portable Document Format file.

    (Inherited from SaveOptions)

    TxtDefault

    Gets the default options for saving to Tab delimited file format.

    (Inherited from SaveOptions)

    XlsDefault

    Gets the default options for saving to, XLS file format (Microsoft Excel Spreadsheet format; Excel 2003 and prior versions) .

    (Inherited from SaveOptions)

    XlsbDefault

    Gets the default options for saving to XLSB file format (Microsoft Excel Binary File Format).

    (Inherited from SaveOptions)

    XlsxDefault

    Gets the default options for saving to XLSX file format (Microsoft Excel Open XML Spreadsheet; Excel 2007 and later).

    (Inherited from SaveOptions)

    XpsDefault

    Gets the default options for saving to XML Paper Specification file format.

    (Inherited from SaveOptions)

    Examples

    Create and write Excel file in C# and VB.NET
    Excel Encryption for XLSX in C# and VB.NET
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.