Class NumbersLoadOptions

NumbersLoadOptions class

Represents the options of loading Apple Numbers files.

public class NumbersLoadOptions : LoadOptions

Constructors

NameDescription
NumbersLoadOptions()Constructor.

Properties

NameDescription
AutoFilter { get; set; }Indicates whether auto filtering the data when loading the files.(Inherited from LoadOptions.)
AutoFitterOptions { get; set; }Gets and sets the auto fitter options(Inherited from LoadOptions.)
CheckDataValid { get; set; }Check whether data is valid in the template file.(Inherited from LoadOptions.)
CheckExcelRestriction { get; set; }Whether check restriction of excel file when user modify cells related objects. For example, excel does not allow inputting string value longer than 32K. When you input a value longer than 32K such as by Cell.PutValue(string), if this property is true, you will get an Exception. If this property is false, we will accept your input string value as the cell’s value so that later you can output the complete string value for other file formats such as CSV. However, if you have set such kind of value that is invalid for excel file format, you should not save the workbook as excel file format later. Otherwise there may be unexpected error for the generated excel file.(Inherited from LoadOptions.)
CultureInfo { get; set; }Gets or sets the system culture info at the time the file was loaded.(Inherited from LoadOptions.)
DefaultStyleSettings { get; }Gets the default style settings for initializing styles of the workbook(Inherited from LoadOptions.)
FontConfigs { get; set; }Gets and sets individual font configs. Only works for the Workbook which uses this LoadOptions to load.(Inherited from LoadOptions.)
IgnoreNotPrinted { get; set; }Ignore the data which are not printed if directly printing the file(Inherited from LoadOptions.)
IgnoreUselessShapes { get; set; }Indicates whether ignoring useless shapes.(Inherited from LoadOptions.)
InterruptMonitor { get; set; }Gets and sets the interrupt monitor.(Inherited from LoadOptions.)
KeepUnparsedData { get; set; }Whether keep the unparsed data in memory for the Workbook when it is loaded from template file. Default is true.(Inherited from LoadOptions.)
LanguageCode { get; set; }Gets or sets the user interface language of the Workbook version based on CountryCode that has saved the file.(Inherited from LoadOptions.)
LightCellsDataHandler { get; set; }The data handler for processing cells data when reading template file.(Inherited from LoadOptions.)
LoadFilter { get; set; }The filter to denote how to load data.(Inherited from LoadOptions.)
LoadFormat { get; }Gets the load format.(Inherited from LoadOptions.)
LoadTableType { get; set; }Gets and sets the type of loading multiple tables in one worksheet.
MemorySetting { get; set; }Gets or sets the memory usage options.(Inherited from LoadOptions.)
ParsingFormulaOnOpen { get; set; }Indicates whether parsing the formula when reading the file.(Inherited from LoadOptions.)
ParsingPivotCachedRecords { get; set; }Indicates whether parsing pivot cached records when loading the file. The default value is false.(Inherited from LoadOptions.)
Password { get; set; }Gets and set the password of the workbook.(Inherited from LoadOptions.)
PreservePaddingSpacesInFormula { get; set; }Indicates whether preserve those spaces and line breaks that are padded between formula tokens while getting and setting formulas. Default value is false.(Inherited from LoadOptions.)
Region { get; set; }Gets or sets the system regional settings based on CountryCode at the time the file was loaded.(Inherited from LoadOptions.)
StandardFont { get; set; }(Obsolete.) Sets the default standard font name(Inherited from LoadOptions.)
StandardFontSize { get; set; }(Obsolete.) Sets the default standard font size.(Inherited from LoadOptions.)
WarningCallback { get; set; }Gets or sets warning callback.(Inherited from LoadOptions.)

Methods

NameDescription
SetPaperSize(PaperSizeType)Sets the default print paper size from default printer’s setting.(Inherited from LoadOptions.)

Examples

[C#]

namespace Demos
{
    using Aspose.Cells;
    using Aspose.Cells.Numbers;
    using System;
    using System.Globalization;

    public class NumbersLoadOptionsDemo
    {
        public static void NumbersLoadOptionsExample()
        {
            // Create an instance of NumbersLoadOptions
            NumbersLoadOptions loadOptions = new NumbersLoadOptions
            {
                // Setting properties
                LoadTableType = LoadNumbersTableType.OneTablePerSheet,
                Password = "password123",
                ParsingFormulaOnOpen = true,
                ParsingPivotCachedRecords = false,
                LanguageCode = CountryCode.USA,
                Region = CountryCode.USA,
                CultureInfo = new CultureInfo("en-US"),
                StandardFont = "Arial",
                StandardFontSize = 10.5,
                IgnoreNotPrinted = true,
                CheckDataValid = true,
                CheckExcelRestriction = true,
                KeepUnparsedData = true,
                LoadFilter = new LoadFilter(LoadDataFilterOptions.All),
                LightCellsDataHandler = new CustomLightCellsDataHandler(),
                MemorySetting = MemorySetting.MemoryPreference,
                WarningCallback = new CustomWarningCallback(),
                AutoFitterOptions = new AutoFitterOptions { AutoFitMergedCells = true },
                AutoFilter = true,
                FontConfigs = new IndividualFontConfigs(),
                IgnoreUselessShapes = true,
                PreservePaddingSpacesInFormula = false
            };

            // Load a Numbers file with the specified load options
            Workbook workbook = new Workbook("NumbersLoadOptionsExample_original.numbers", loadOptions);

            // Save the workbook in XLSX format
            workbook.Save("NumbersLoadOptionsExample.xlsx");
        }
    }

    // Custom implementation of LightCellsDataHandler
    public class CustomLightCellsDataHandler : LightCellsDataHandler
    {
        public bool ProcessCell(Cell cell)
        {
            return true;
        }

        public bool ProcessRow(Row row)
        {
            return true;
        }

        public bool StartCell(int columnIndex)
        {
            return true;
        }

        public bool StartRow(int rowIndex)
        {
            return true;
        }

        public bool StartSheet(Worksheet sheet)
        {
            return true;
        }
    }

    // Custom implementation of IWarningCallback
    public class CustomWarningCallback : IWarningCallback
    {
        public void Warning(WarningInfo warningInfo)
        {
            Console.WriteLine($"Warning: {warningInfo.Description}");
        }
    }
}

See Also