Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

IWorkNumbersDocument

OfficeIMO.IWork

Namespace
OfficeIMO.IWork
Assembly
OfficeIMO.IWork
Source revision
273d35d5ba8a with working tree changes
Implements
IDisposable
Modifiers
sealed

Creates template-free native Numbers spreadsheets with positioned scalar tables.

Inheritance

  • object
  • IWorkNumbersDocument

Remarks

Instances are not thread safe. This creation model does not edit loaded packages or author formulas.

Usage

Explore 1 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 1

Methods

public IWorkNumbersSheetBuilder AddSheet(string name) #

Adds a sheet with a unique name, compared without case.

Parameters

name string required
Create 2 overloads
public static IWorkNumbersDocument Create() #

Creates an empty spreadsheet. Add at least one sheet and a table to each sheet before saving.

public static IWorkNumbersDocument Create(string path) #

Creates a native authoring model associated with a path, without writing a file.

Parameters

path string required
public void Dispose() #

Completes this managed authoring model's lifetime. No native application, file or caller stream is retained.

Save 3 overloads
public void Save(Stream destination, IWorkNumbersSaveOptions? options = null, CancellationToken cancellationToken = default) #

Writes a completed package at the stream's current position and leaves the stream open.

Parameters

destination System.IO.Stream required
options OfficeIMO.IWork.IWorkNumbersSaveOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public void Save(string path, bool overwrite = false, IWorkNumbersSaveOptions? options = null, CancellationToken cancellationToken = default) #

Atomically saves a native package, rejecting an existing file unless overwrite is enabled.

Parameters

path string required
overwrite bool = false optional
options OfficeIMO.IWork.IWorkNumbersSaveOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public void Save(bool overwrite = false, IWorkNumbersSaveOptions? options = null, CancellationToken cancellationToken = default) #

Saves to the associated path; replacing an existing file still requires explicit overwrite.

Parameters

overwrite bool = false optional
options OfficeIMO.IWork.IWorkNumbersSaveOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public byte[] ToBytes(IWorkNumbersSaveOptions? options = null, CancellationToken cancellationToken = default) #

Encodes a deterministic native Numbers package without a template or native application.

Parameters

options OfficeIMO.IWork.IWorkNumbersSaveOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

byte[]

Properties

public IReadOnlyList<IWorkNumbersSheetBuilder> Sheets { get; } #

Gets sheets in insertion order.

public string? FilePath { get; private set; } #

Gets the associated output path; stream saves do not change it.