ComOfficeKitby KDAN API Reference for Windows
Table of Contents

Class WorkbookSceneEditor

Namespace
ComOfficeKit.Model
Assembly
ComOfficeKit.dll

The Apple SDK's WorkbookSceneEditor, on one workbook: each method is the Swift function of its name, run by the engine on the workbook as one undo step. A position or an id comes from a model read, such as GetWorkbook(), and a snapshot read before an edit keeps its old values: read again after one.

public sealed class WorkbookSceneEditor
Inheritance
WorkbookSceneEditor
Inherited Members

Methods

ClearingFormat(CellReference, long, CellValue?)

The Apple SDK's WorkbookSceneEditor.clearingFormat(at:sheetIndex:in:fallbackValue:), on this workbook. One undo step.

public long ClearingFormat(CellReference at, long sheetIndex, CellValue? fallbackValue = null)

Parameters

at CellReference

Swift's at (CellReference): column from 1 to 16384; row from 1 to 1048576.

sheetIndex long

Swift's sheetIndex (Int): from 0 to 65535.

fallbackValue CellValue

Swift's fallbackValue (CellValue); null for its default, .empty.

Returns

long

The workbook's ModelRevision after the edit.

Exceptions

ComOfficeKitException

InvalidArgument when the engine refuses an argument, or the function makes no edit with them.

DefaultAuthoredTableStyle()

The Apple SDK's WorkbookSceneEditor.defaultAuthoredTableStyle(), on this workbook as it stands. It changes nothing.

public TableStyle DefaultAuthoredTableStyle()

Returns

TableStyle

What the function returns (TableStyle).

Exceptions

ComOfficeKitException

InvalidArgument when the engine refuses an argument.

DeletingColumns(long, long, long)

The Apple SDK's WorkbookSceneEditor.deletingColumns(_:at:inSheet:in:), on this workbook. One undo step.

public long DeletingColumns(long count, long at, long inSheet)

Parameters

count long

Swift's count (Int): from 1 to 16384.

at long

Swift's at (Int): from 1 to 16384.

inSheet long

Swift's inSheet (Int): from 0 to 65535.

Returns

long

The workbook's ModelRevision after the edit.

Exceptions

ComOfficeKitException

InvalidArgument when the engine refuses an argument, or the function makes no edit with them.

DeletingRows(long, long, long)

The Apple SDK's WorkbookSceneEditor.deletingRows(_:at:inSheet:in:), on this workbook. One undo step.

public long DeletingRows(long count, long at, long inSheet)

Parameters

count long

Swift's count (Int): from 1 to 1048576.

at long

Swift's at (Int): from 1 to 1048576.

inSheet long

Swift's inSheet (Int): from 0 to 65535.

Returns

long

The workbook's ModelRevision after the edit.

Exceptions

ComOfficeKitException

InvalidArgument when the engine refuses an argument, or the function makes no edit with them.

InsertingChart(CellRange, ChartContentChartType, DrawingAnchor, long)

The Apple SDK's WorkbookSceneEditor.insertingChart(of:type:anchor:sheetIndex:in:), on this workbook. One undo step.

public long InsertingChart(CellRange of, ChartContentChartType type, DrawingAnchor anchor, long sheetIndex)

Parameters

of CellRange

Swift's of (CellRange): start.column from 1 to 16384; start.row from 1 to 1048576; end.column from 1 to 16384; end.row from 1 to 1048576.

type ChartContentChartType

Swift's type (ChartContent.ChartType).

anchor DrawingAnchor

Swift's anchor (DrawingAnchor): fromColumn from 0 to 16383; fromColumnOffsetEMU from 0 to 17000000; fromRow from 0 to 1048575; fromRowOffsetEMU from 0 to 17000000; toColumn from 0 to 16383; toColumnOffsetEMU from 0 to 17000000; toRow from 0 to 1048575; toRowOffsetEMU from 0 to 17000000.

sheetIndex long

Swift's sheetIndex (Int): from 0 to 65535.

Returns

long

The workbook's ModelRevision after the edit.

Exceptions

ComOfficeKitException

InvalidArgument when the engine refuses an argument, or the function makes no edit with them.

InsertingColumns(long, long, long)

The Apple SDK's WorkbookSceneEditor.insertingColumns(_:at:inSheet:in:), on this workbook. One undo step.

public long InsertingColumns(long count, long at, long inSheet)

Parameters

count long

Swift's count (Int): from 1 to 16384.

at long

Swift's at (Int): from 1 to 16384.

inSheet long

Swift's inSheet (Int): from 0 to 65535.

Returns

long

The workbook's ModelRevision after the edit.

Exceptions

ComOfficeKitException

InvalidArgument when the engine refuses an argument, or the function makes no edit with them.

InsertingRows(long, long, long)

The Apple SDK's WorkbookSceneEditor.insertingRows(_:at:inSheet:in:), on this workbook. One undo step.

public long InsertingRows(long count, long at, long inSheet)

Parameters

count long

Swift's count (Int): from 1 to 1048576.

at long

Swift's at (Int): from 1 to 1048576.

inSheet long

Swift's inSheet (Int): from 0 to 65535.

Returns

long

The workbook's ModelRevision after the edit.

Exceptions

ComOfficeKitException

InvalidArgument when the engine refuses an argument, or the function makes no edit with them.

InsertingTable(string, CellRange, long, TableStyle)

The Apple SDK's WorkbookSceneEditor.insertingTable(named:over:sheetIndex:style:in:), on this workbook. One undo step.

public long InsertingTable(string named, CellRange over, long sheetIndex, TableStyle style)

Parameters

named string

Swift's named (String).

over CellRange

Swift's over (CellRange): start.column from 1 to 16384; start.row from 1 to 1048576; end.column from 1 to 16384; end.row from 1 to 1048576.

sheetIndex long

Swift's sheetIndex (Int): from 0 to 65535.

style TableStyle

Swift's style (TableStyle).

Returns

long

The workbook's ModelRevision after the edit.

Exceptions

ComOfficeKitException

InvalidArgument when the engine refuses an argument, or the function makes no edit with them.

MovingChart(Guid, DrawingAnchor, long)

The Apple SDK's WorkbookSceneEditor.movingChart(id:to:sheetIndex:in:), on this workbook. One undo step.

public long MovingChart(Guid id, DrawingAnchor to, long sheetIndex)

Parameters

id Guid

Swift's id (UUID).

to DrawingAnchor

Swift's to (DrawingAnchor): fromColumn from 0 to 16383; fromColumnOffsetEMU from 0 to 17000000; fromRow from 0 to 1048575; fromRowOffsetEMU from 0 to 17000000; toColumn from 0 to 16383; toColumnOffsetEMU from 0 to 17000000; toRow from 0 to 1048575; toRowOffsetEMU from 0 to 17000000.

sheetIndex long

Swift's sheetIndex (Int): from 0 to 65535.

Returns

long

The workbook's ModelRevision after the edit.

Exceptions

ComOfficeKitException

InvalidArgument when the engine refuses an argument, or the function makes no edit with them.

MovingDrawing(Guid, DrawingAnchor, long)

The Apple SDK's WorkbookSceneEditor.movingDrawing(id:to:sheetIndex:in:), on this workbook. One undo step.

public long MovingDrawing(Guid id, DrawingAnchor to, long sheetIndex)

Parameters

id Guid

Swift's id (UUID).

to DrawingAnchor

Swift's to (DrawingAnchor): fromColumn from 0 to 16383; fromColumnOffsetEMU from 0 to 17000000; fromRow from 0 to 1048575; fromRowOffsetEMU from 0 to 17000000; toColumn from 0 to 16383; toColumnOffsetEMU from 0 to 17000000; toRow from 0 to 1048575; toRowOffsetEMU from 0 to 17000000.

sheetIndex long

Swift's sheetIndex (Int): from 0 to 65535.

Returns

long

The workbook's ModelRevision after the edit.

Exceptions

ComOfficeKitException

InvalidArgument when the engine refuses an argument, or the function makes no edit with them.

RemovingCells(IReadOnlyCollection<CellReference>, long)

The Apple SDK's WorkbookSceneEditor.removingCells(at:sheetIndex:in:), on this workbook. One undo step.

public long RemovingCells(IReadOnlyCollection<CellReference> at, long sheetIndex)

Parameters

at IReadOnlyCollection<CellReference>

Swift's at (Set<CellReference>).

sheetIndex long

Swift's sheetIndex (Int): from 0 to 65535.

Returns

long

The workbook's ModelRevision after the edit.

Exceptions

ComOfficeKitException

InvalidArgument when the engine refuses an argument, or the function makes no edit with them.

RemovingChart(Guid, long)

The Apple SDK's WorkbookSceneEditor.removingChart(id:sheetIndex:in:), on this workbook. One undo step.

public long RemovingChart(Guid id, long sheetIndex)

Parameters

id Guid

Swift's id (UUID).

sheetIndex long

Swift's sheetIndex (Int): from 0 to 65535.

Returns

long

The workbook's ModelRevision after the edit.

Exceptions

ComOfficeKitException

InvalidArgument when the engine refuses an argument, or the function makes no edit with them.

RemovingDrawing(Guid, long)

The Apple SDK's WorkbookSceneEditor.removingDrawing(id:sheetIndex:in:), on this workbook. One undo step.

public long RemovingDrawing(Guid id, long sheetIndex)

Parameters

id Guid

Swift's id (UUID).

sheetIndex long

Swift's sheetIndex (Int): from 0 to 65535.

Returns

long

The workbook's ModelRevision after the edit.

Exceptions

ComOfficeKitException

InvalidArgument when the engine refuses an argument, or the function makes no edit with them.

RemovingSheet(long)

The Apple SDK's WorkbookSceneEditor.removingSheet(at:in:), on this workbook. One undo step.

public long RemovingSheet(long at)

Parameters

at long

Swift's at (Int): from 0 to 65535.

Returns

long

The workbook's ModelRevision after the edit.

Exceptions

ComOfficeKitException

InvalidArgument when the engine refuses an argument, or the function makes no edit with them.

RenamingSheet(long, string)

The Apple SDK's WorkbookSceneEditor.renamingSheet(at:to:in:), on this workbook. One undo step.

public long RenamingSheet(long at, string to)

Parameters

at long

Swift's at (Int): from 0 to 65535.

to string

Swift's to (String).

Returns

long

The workbook's ModelRevision after the edit.

Exceptions

ComOfficeKitException

InvalidArgument when the engine refuses an argument, or the function makes no edit with them.

ReplacingConditionalRules(IReadOnlyCollection<ConditionalRule>, long)

The Apple SDK's SheetScene.replacingConditionalRules(_:) on a sheet of this workbook: its conditional formats, all of them. One undo step.

public long ReplacingConditionalRules(IReadOnlyCollection<ConditionalRule> rules, long sheetIndex)

Parameters

rules IReadOnlyCollection<ConditionalRule>

The sheet's rules, as ConditionalRules holds them; a rule left out is deleted, and the order they apply in is their Priority, 1 first.

  • A rule read from the sheet and given back with its Kind and Ranges as they were keeps what the file held of it. Its priority and StopIfTrue may change.
  • A rule of the kind ConditionalRuleKind.Unsupported (Top 10, Above Average, a formula, a date) can be kept or left out, but not made or changed: the engine carries it without writing it.
  • Any other rule is held to what Excel opens. It needs an id no other rule has, and a priority of 1 or more. Its ranges are on Excel's grid, columns 1 to 16,384 and rows 1 to 1,048,576, with their corners in either order.
  • A comparison takes one value, or two for between. A value is a formula without its "=", such as "5" or "$A$1".
  • A text rule's text has 1 to 255 characters. Colours are RRGGBB.
  • A colour scale has 2 or 3 stops. Thresholds are the lowest or highest value, a number, or a percent or percentile from 0 to 100.
  • An icon set is one the engine draws, with one threshold per icon.
  • Rules that share a SourceBlockIndex apply to the same ranges. A new rule takes an index no other rule has.
sheetIndex long

The sheet's index, from 0.

Returns

long

The workbook's ModelRevision after the edit.

Exceptions

ComOfficeKitException

InvalidArgument when the engine refuses a rule or the sheet's index.

SettingCellValue(CellValue, string?, CellReference, long)

The Apple SDK's WorkbookSceneEditor.settingCellValue(_:formula:at:sheetIndex:in:), on this workbook. One undo step.

public long SettingCellValue(CellValue value, string? formula, CellReference at, long sheetIndex)

Parameters

value CellValue

Swift's value (CellValue).

formula string

Swift's formula (String?).

at CellReference

Swift's at (CellReference): column from 1 to 16384; row from 1 to 1048576.

sheetIndex long

Swift's sheetIndex (Int): from 0 to 65535.

Returns

long

The workbook's ModelRevision after the edit.

Exceptions

ComOfficeKitException

InvalidArgument when the engine refuses an argument, or the function makes no edit with them.

SettingColumnWidth(long, double?, long)

The Apple SDK's WorkbookSceneEditor.settingColumnWidth(column:widthChars:sheetIndex:in:), on this workbook. One undo step.

public long SettingColumnWidth(long column, double? widthChars, long sheetIndex)

Parameters

column long

Swift's column (Int): from 1 to 16384.

widthChars double?

Swift's widthChars (Double?): from 0 to 255.

sheetIndex long

Swift's sheetIndex (Int): from 0 to 65535.

Returns

long

The workbook's ModelRevision after the edit.

Exceptions

ComOfficeKitException

InvalidArgument when the engine refuses an argument, or the function makes no edit with them.

SettingFillColor(string?, CellReference, long, CellValue?)

The Apple SDK's WorkbookSceneEditor.settingFillColor(_:at:sheetIndex:in:fallbackValue:), on this workbook. One undo step.

public long SettingFillColor(string? colorHex, CellReference at, long sheetIndex, CellValue? fallbackValue = null)

Parameters

colorHex string

Swift's colorHex (String?).

at CellReference

Swift's at (CellReference): column from 1 to 16384; row from 1 to 1048576.

sheetIndex long

Swift's sheetIndex (Int): from 0 to 65535.

fallbackValue CellValue

Swift's fallbackValue (CellValue); null for its default, .empty.

Returns

long

The workbook's ModelRevision after the edit.

Exceptions

ComOfficeKitException

InvalidArgument when the engine refuses an argument, or the function makes no edit with them.

SettingFontColor(string?, CellReference, long, CellValue?)

The Apple SDK's WorkbookSceneEditor.settingFontColor(_:at:sheetIndex:in:fallbackValue:), on this workbook. One undo step.

public long SettingFontColor(string? colorHex, CellReference at, long sheetIndex, CellValue? fallbackValue = null)

Parameters

colorHex string

Swift's colorHex (String?).

at CellReference

Swift's at (CellReference): column from 1 to 16384; row from 1 to 1048576.

sheetIndex long

Swift's sheetIndex (Int): from 0 to 65535.

fallbackValue CellValue

Swift's fallbackValue (CellValue); null for its default, .empty.

Returns

long

The workbook's ModelRevision after the edit.

Exceptions

ComOfficeKitException

InvalidArgument when the engine refuses an argument, or the function makes no edit with them.

SettingFontFamily(string?, CellReference, long, CellValue?)

The Apple SDK's WorkbookSceneEditor.settingFontFamily(_:at:sheetIndex:in:fallbackValue:), on this workbook. One undo step.

public long SettingFontFamily(string? family, CellReference at, long sheetIndex, CellValue? fallbackValue = null)

Parameters

family string

Swift's family (String?).

at CellReference

Swift's at (CellReference): column from 1 to 16384; row from 1 to 1048576.

sheetIndex long

Swift's sheetIndex (Int): from 0 to 65535.

fallbackValue CellValue

Swift's fallbackValue (CellValue); null for its default, .empty.

Returns

long

The workbook's ModelRevision after the edit.

Exceptions

ComOfficeKitException

InvalidArgument when the engine refuses an argument, or the function makes no edit with them.

SettingFontSize(double?, CellReference, long, CellValue?)

The Apple SDK's WorkbookSceneEditor.settingFontSize(_:at:sheetIndex:in:fallbackValue:), on this workbook. One undo step.

public long SettingFontSize(double? sizePt, CellReference at, long sheetIndex, CellValue? fallbackValue = null)

Parameters

sizePt double?

Swift's sizePt (Double?): from 1 to 409.

at CellReference

Swift's at (CellReference): column from 1 to 16384; row from 1 to 1048576.

sheetIndex long

Swift's sheetIndex (Int): from 0 to 65535.

fallbackValue CellValue

Swift's fallbackValue (CellValue); null for its default, .empty.

Returns

long

The workbook's ModelRevision after the edit.

Exceptions

ComOfficeKitException

InvalidArgument when the engine refuses an argument, or the function makes no edit with them.

SettingFontTrait(WorkbookSceneEditorFontTrait, bool, CellReference, long, CellValue?)

The Apple SDK's WorkbookSceneEditor.settingFontTrait(_:to:at:sheetIndex:in:fallbackValue:), on this workbook. One undo step.

public long SettingFontTrait(WorkbookSceneEditorFontTrait trait, bool to, CellReference at, long sheetIndex, CellValue? fallbackValue = null)

Parameters

trait WorkbookSceneEditorFontTrait

Swift's trait (WorkbookSceneEditor.FontTrait).

to bool

Swift's to (Bool).

at CellReference

Swift's at (CellReference): column from 1 to 16384; row from 1 to 1048576.

sheetIndex long

Swift's sheetIndex (Int): from 0 to 65535.

fallbackValue CellValue

Swift's fallbackValue (CellValue); null for its default, .empty.

Returns

long

The workbook's ModelRevision after the edit.

Exceptions

ComOfficeKitException

InvalidArgument when the engine refuses an argument, or the function makes no edit with them.

SettingFormat(CellRange, long, CellFormatChange)

The Apple SDK's WorkbookSceneEditor.settingFormat(inRange:sheetIndex:in:transform:), on this workbook. One undo step.

public long SettingFormat(CellRange inRange, long sheetIndex, CellFormatChange transform)

Parameters

inRange CellRange

Swift's inRange (CellRange): start.column from 1 to 16384; start.row from 1 to 1048576; end.column from 1 to 16384; end.row from 1 to 1048576.

sheetIndex long

Swift's sheetIndex (Int): from 0 to 65535.

transform CellFormatChange

What to change in each cell's CellFormat: the members set, or cleared.

Returns

long

The workbook's ModelRevision after the edit.

Exceptions

ComOfficeKitException

InvalidArgument when the engine refuses an argument, or the function makes no edit with them.

SettingHorizontalAlignment(CellAlignmentHorizontalAlignment?, CellReference, long, CellValue?)

The Apple SDK's WorkbookSceneEditor.settingHorizontalAlignment(_:at:sheetIndex:in:fallbackValue:), on this workbook. One undo step.

public long SettingHorizontalAlignment(CellAlignmentHorizontalAlignment? horizontal, CellReference at, long sheetIndex, CellValue? fallbackValue = null)

Parameters

horizontal CellAlignmentHorizontalAlignment?

Swift's horizontal (CellAlignment.HorizontalAlignment?).

at CellReference

Swift's at (CellReference): column from 1 to 16384; row from 1 to 1048576.

sheetIndex long

Swift's sheetIndex (Int): from 0 to 65535.

fallbackValue CellValue

Swift's fallbackValue (CellValue); null for its default, .empty.

Returns

long

The workbook's ModelRevision after the edit.

Exceptions

ComOfficeKitException

InvalidArgument when the engine refuses an argument, or the function makes no edit with them.

SettingNumberFormat(string?, CellReference, long, CellValue?)

The Apple SDK's WorkbookSceneEditor.settingNumberFormat(_:at:sheetIndex:in:fallbackValue:), on this workbook. One undo step.

public long SettingNumberFormat(string? code, CellReference at, long sheetIndex, CellValue? fallbackValue = null)

Parameters

code string

Swift's code (String?).

at CellReference

Swift's at (CellReference): column from 1 to 16384; row from 1 to 1048576.

sheetIndex long

Swift's sheetIndex (Int): from 0 to 65535.

fallbackValue CellValue

Swift's fallbackValue (CellValue); null for its default, .empty.

Returns

long

The workbook's ModelRevision after the edit.

Exceptions

ComOfficeKitException

InvalidArgument when the engine refuses an argument, or the function makes no edit with them.