Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

ExcelLoadOptions

OfficeIMO.Excel

Namespace
OfficeIMO.Excel
Assembly
OfficeIMO.Excel
Source revision
273d35d5ba8a with working tree changes
Base
DocumentLoadOptions
Modifiers
sealed

Controls HTTP workbook loading behavior for ExcelDocument and its public reader APIs.

Inheritance

  • DocumentLoadOptions
  • ExcelLoadOptions

Usage

Explore 4 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by 2

Accepted by parameters 2

Constructors

public ExcelLoadOptions() #

Properties

public ExcelUriSchemePolicy SchemePolicy { get; set; } #

Gets or sets the allowed URI schemes. Defaults to HTTPS only.

public long MaxBytes { get; set; } #

Gets or sets the maximum number of response bytes that may be downloaded.

public TimeSpan Timeout { get; set; } #

Gets or sets the timeout applied to the HTTP request and response copy.

public string? UserAgent { get; set; } #

Gets or sets the user agent sent when a User-Agent header is not provided in ExcelLoadOptions.Headers. Set to null to suppress the default user agent.

public IDictionary<string, string> Headers { get; private set; } #

Gets headers to send with the HTTP GET request.

public ISet<string> AllowedHosts { get; private set; } #

Gets allowed remote workbook host names. When empty, any host is allowed. Entries are host names only; schemes, paths, and ports are not accepted.

public bool AllowPrivateNetworkAddresses { get; set; } #

Gets or sets whether a remote workbook may be loaded from a loopback, private, link-local or other non-public network address. Default: false. Enable it only for trusted internal sources.

public bool ValidateZipHeader { get; set; } #

Gets or sets whether a download must begin with a ZIP, compound Excel, or supported raw BIFF workbook header.

public bool ValidateContentTypeWhenPresent { get; set; } #

Gets or sets whether response Content-Type should be validated when present.

public ISet<string> AllowedContentTypes { get; private set; } #

Gets the accepted media types used when ExcelLoadOptions.ValidateContentTypeWhenPresent is enabled.

public IProgress<ExcelHttpLoadProgress>? Progress { get; set; } #

Gets or sets an optional progress sink invoked as response bytes are copied.

public static ExcelLoadOptions UntrustedDefaults { get; } #

Creates bounded options that reject active, embedded, and externally linked package content.

public long? MaxInputBytes { get; set; } #

Maximum workbook bytes buffered by load APIs. Default: 512 MiB. Set to null to disable this compatibility guard.

public bool AllowBinaryProjection { get; set; } #

Allows native XLS and XLSB projection into an XML workbook model. Default: true. False rejects those source families before secondary payload projection, including mislabeled input.

public OfficeOpenXmlLoadSettings? OpenSettings { get; set; } #

Provides optional low-level Open XML package settings.

public string? Password { get; set; } #

Password for an encrypted workbook source.

public bool FileBacked { get; set; } #

Stages an Open XML workbook in a bounded temporary file instead of memory.

public int MaxLegacyInputBytes { get; set; } #

Maximum binary XLS input bytes admitted by the native decoder.

public int MaxDecodedImageBytes { get; set; } #

Maximum aggregate decoded legacy picture bytes.

public bool ReportUnsupportedContent { get; set; } #

Reports recognized unsupported legacy workbook features.

public int MaxPartBytes { get; set; } #

For XLSB sources, controls the largest accepted decompressed package part. The default is 128 MiB.

public long MaxPackageBytes { get; set; } #

For XLSB sources, controls the aggregate decompressed package budget. The default is 512 MiB.

public int MaxRecordBytes { get; set; } #

For XLSB sources, controls the largest accepted BIFF12 record payload. The default is 64 MiB.

public int MaxRecordCount { get; set; } #

For XLSB sources, controls the aggregate BIFF12 record limit across one workbook import. The default is 8,000,000.

public int MaxWorksheets { get; set; } #

For XLSB sources, controls the maximum number of worksheets accepted from one workbook.

public int MaxCells { get; set; } #

For XLSB sources, controls the maximum number of populated cells projected from one workbook.

public int MaxLogicalRows { get; set; } #

For XLSB sources, controls the maximum logical rows emitted across one workbook data-reader operation.

public int MaxRowDefinitions { get; set; } #

For XLSB sources, controls the maximum number of row metadata definitions projected from one workbook.

public int MaxSharedStrings { get; set; } #

For XLSB sources, controls the maximum number of shared-string items accepted.

public int MaxSharedStringItemCharacters { get; set; } #

For XLSB sources, controls the maximum UTF-16 character length of one shared-string item.

public long MaxSharedStringCharacters { get; set; } #

For XLSB sources, controls the aggregate UTF-16 character budget for the shared-string table.

public int MaxMergedRanges { get; set; } #

For XLSB sources, controls the maximum number of merged ranges accepted from one workbook.

public int MaxStringCharacters { get; set; } #

For XLSB sources, controls the maximum number of UTF-16 characters accepted in one BIFF12 string.

public bool ReportPreservedRecords { get; set; } #

For XLSB sources, controls whether unknown records are listed in the import preservation report.

public int MaxRelatedParts { get; set; } #

For XLSB sources, controls the largest chart/VBA related-part graph projected from one workbook.

public int MaxRelationshipDepth { get; set; } #

For XLSB sources, controls the largest relationship depth projected from chart and VBA carriers.

Fields

public const long DefaultMaxInputBytes #

Default maximum complete source size (512 MiB).

Value: 536870912