Перейти к содержимому
FastOffice

Типы: VBA и макросы

Определения типов Compute Contract — проект, запуск, доверие и список одобренных макросов. Имён: 28.

Определения имён из колонки «Тип TypeScript» на страницах операций.

Другие темы словаря: сеанс, книга и листы · ячейки и диапазоны · формулы и вычисления · форматирование · данные и объекты листа · сводные таблицы · диаграммы и графика · печать и разметка страницы · Power Query · VBA и макросы · защита и рецензирование · общие и служебные.

type ContractMacroTrustIntent =
| { action: "inspect" }
| { action: "inspect_signatures" }
| { action: "keep_macros" }
| { action: "remove_macros_from_copy"; destinationUri: string }
| { action: "save_signature_copy"; destinationUri: string }
| { action: "remove_signatures" }
| { action: "cancel" };
interface ContractMacroTrustInventoryCounts {
packageParts: number;
vbaProjects: number;
vbaRelationships: number;
signatureParts: number;
customUiParts: number;
activeXParts: number;
oleParts: number;
formControlParts?: number;
externalLinkParts?: number;
externalRelationships?: number;
}
type ContractMacroTrustProvenance = "package-inventory" | "protected-view-policy" | "trusted-location-policy";
interface ContractMacroTrustResult {
states: ContractMacroTrustState[];
counts: ContractMacroTrustInventoryCounts;
cryptographicSignatureValidated: false;
vbaRuntimeAvailable: false;
packageFormat?: ContractFileFormat;
trustProvenance?: ContractMacroTrustProvenance[];
opaquePreservationVerified?: boolean;
sourceBytesUnchanged: boolean;
copied: boolean;
outputByteCount: number;
removedPartCount: number;
removedRelationshipCount: number;
macroFreeRemainderCount?: number;
sourceMutated?: boolean;
signatureInventory?: OpcSignatureInventory;
reasonCode?: string;
}
type ContractMacroTrustState =
| "macro-present"
| "signature-part-present"
| "unsigned"
| "modified-after-signature-risk"
| "malformed"
| "blocked-by-protected-view"
| "blocked-by-trusted-location"
| "unsupported";
type ContractTrustCenterMacroPolicy = "block_with_notification" | "block_without_notification";
interface VbaBlockerSourceSpan {
line: number;
column: number;
length: number;
offset: number;
}
interface VbaCapabilityBlocker {
kind: VbaCapabilityBlockerKind;
detail: string;
evidence: string;
sourceSpan: VbaBlockerSourceSpan | null;
module: string;
procedure: string | null;
}
type VbaCapabilityBlockerKind =
| "external-automation"
| "event-or-document-module"
| "language-pending"
| "host-member-pending"
| "unparsed"
| "run-declaration-pending"
| "excel-compile-error";
interface VbaEntrypointDescriptor {
entrypoint: string;
module: string;
procedure: string;
kind: VbaMacroKind;
visibility: VbaMacroVisibility;
userRunnable: boolean;
route: VbaExecutionRoute;
nativeClaim: boolean;
nativeLowerable: number;
blockers: VbaCapabilityBlocker[];
}
interface VbaExecutionOutcome {
kind: VbaExecutionOutcomeKind;
stop: string | null;
detail: string;
rolledBack: boolean;
progress?: {
phase: "pending" | "running" | "finished";
steps: number;
instructionBudget: number;
cancellationRequested: boolean;
};
}
type VbaExecutionOutcomeKind =
| "running"
| "completed"
| "refused-by-capability"
| "unknown-entrypoint"
| "unresolved-code-module"
| "runtime-error"
| "runtime-stopped";
interface VbaExecutionPlan {
planId: string;
planHash: string;
entrypoint: string;
route: VbaExecutionRoute | null;
mayRunNatively: boolean;
blockers: VbaCapabilityBlocker[];
instructionBudget: number;
steps: null;
}
type VbaExecutionRoute = "native" | "excel-bridge" | "excel-bridge-legacy" | "preserve-only";
type VbaExecutionSessionId = string;
type VbaMacroKind = "sub" | "function" | "property-get" | "property-let" | "property-set";
type VbaMacroVisibility = "public" | "private" | "friend";
interface VbaModuleCapability {
name: string;
kind: VbaModuleKind;
supportedLines: number;
unsupportedLines: number;
syntaxErrorLines: number;
entrypointCount: number;
}
type VbaModuleKind = "standard" | "document" | "class" | "form" | "unknown";
interface VbaMutationPreview {
cells: VbaMutationPreviewCell[];
structural: VbaStructuralPreview;
structureTouched: boolean;
sessionStateTouched: boolean;
}
interface VbaMutationPreviewCell {
sheet: string;
row: number;
col: number;
beforeDisplayText: string | null;
afterDisplayText: string | null;
beforeFormula: string | null;
afterFormula: string | null;
}
interface VbaProjectBlockerTally {
kind: VbaCapabilityBlockerKind;
macros: number;
}
interface VbaProjectCapabilitySummary {
modules: number;
macros: number;
nativeCandidates: number;
excelBridge: number;
excelBridgeLegacy: number;
preserveOnly: number;
userRunnable: number;
userRunnableNative: number;
nativeCandidateRatio: number;
topBlockers: VbaProjectBlockerTally[];
}
interface VbaProjectInspection {
capabilityContractVersion: number;
sourceLabel: string;
projectName: string | null;
codePage: number;
modules: VbaModuleCapability[];
references: VbaProjectReference[];
entrypoints: VbaEntrypointDescriptor[];
summary: VbaProjectCapabilitySummary;
}
interface VbaProjectReference {
key: string;
value: string;
}
interface VbaStructuralChange {
operation: VbaStructuralChangeOperation;
sheet: string | null;
description: string;
}
type VbaStructuralChangeOperation =
| "sheet-added"
| "sheet-renamed"
| "sheet-deleted"
| "cells-inserted"
| "cells-deleted"
| "name-defined"
| "save-as-staged";
type VbaStructuralPreview =
| { state: "none" }
| { state: "listed"; changes: VbaStructuralChange[] }
| { state: "incomplete"; named: VbaStructuralChange[] };

Ассистент документации

Ответ собран из документации и может быть неточным — сверяйтесь с источниками.