Search Results for

    Show / Hide Table of Contents

    Class SavingOptions

    Options for saving WorkBook object to file.

    Inheritance
    System.Object
    SavingOptions
    Namespace: IronXL.Options
    Assembly: IronXL.dll
    Syntax
    public class SavingOptions : Object

    Encryption and CSV formatting on the way out are decided by SavingOptions. It is the settings object a developer passes when writing a workbook to disk, so a saved file can be protected with a password or written with a chosen list separator instead of accepting the defaults.

    Set the property a save needs, then hand the options to the save call. Password encrypts the workbook with the given value, so the resulting file requires that password to open. ListDelimiter sets the separator used when saving to CSV; its default follows the current region's culture, which matters when a target system expects a comma in a locale that defaults to a semicolon. Both are simple string properties, and a save that needs neither can skip the options entirely. The parameterless constructor creates an instance with both properties unset, ready to assign only what a particular output requires.

    using IronXL.Options;
    
    var options = new SavingOptions();
    options.Password = "secret";

    The write to CSV how-to saves delimited output, and the password-protect a workbook how-to secures a saved file.

    Constructors

    SavingOptions()

    Declaration
    public SavingOptions()

    Properties

    ListDelimiter

    Property that indicates CSV file list delimiter.

    Default value depends on current region. Take a look at System.Globalization.CultureInfo

    Declaration
    public string ListDelimiter { get; set; }
    Property Value
    Type Description
    System.String

    Password

    Password to encrypt the workbook with

    Declaration
    public string Password { get; set; }
    Property Value
    Type Description
    System.String
    ☀
    ☾
    Downloads
    • Download with Nuget
    • Start for Free
    In This Article
    Back to top
    Install with Nuget