Skip to content
SumOfficeSumOfficeSumOffice

VBA, Power Query, and agents

Automation without losing control: a supported subset instead of blanket promises, a Power Query ladder, and agent work as a transaction.

The most common question when moving away from Excel is “will my macros and queries come along?”. The honest answer: some will, some won’t, and the main thing is to find out before the rollout, not after. The platform is built so that what’s unsupported doesn’t break the file silently but is named explicitly, and a change can be seen before it’s applied.

Full VBA compatibility isn’t promised. The supported subset runs; everything else is rejected with a clear reason — before the document changes. For documents the rule is stricter: running macros isn’t promised at all, and reading their contents is separated from running them.

Where What’s promised What isn’t promised
Spreadsheets (SumSheet) VBA compatibility as a separate capability on top of the operations contract; unsupported language constructs, application calls, and attempts to cross security boundaries are rejected with a stated reason. Full compatibility with Excel VBA — without an agreed set of workbooks, security requirements, and a matrix of supported calls.
Documents (SumDoc) Detecting macros and their printable strings without running them; business-logic events through the public event set and policy enforcement points. Parsing macros into source code, running them, and an Office.js-compatible environment — without a separate agreement.
Enterprise automation The “inspect → propose → confirm → apply” order, role-based restrictions, protection against repeated execution, an action log. An agent that clicks through the interface or edits the file directly.

Power Query is a strength for enterprise rollouts, but it needs to be discussed in steps, not with the single word “supported”. It’s not a full match with Excel: the declared subset works, the rest is rejected with a stated reason.

  • Recognize. Find the queries, connections, data model, and anything unsupported in the workbook.
  • Preserve. Don’t delete, on write, anything the operation doesn’t manage.
  • Show. Reveal the query structure without exposing credentials or handing over the whole workbook.
  • Refresh. Run agreed sources and transformations — within the bounds of the declared capabilities and set rules.
  • Create. Add and change queries and connections within the confirmed subset.

There are contract operations for every step — 61 of them, spread across seven sections of the reference.

The agent works not by clicking and not by editing the file, but through the same contract as the interface. It has stable object identifiers, a revision check before a change, policy enforcement points, a preview of the result, and the ability to confirm or roll back.

Documentation assistant

Answers are assembled from the documentation and may be inaccurate — check the sources.