Skip to content
Agent Tools

executeOfficeJs

Execute an Office.js code snippet directly against the active workbook. Returns any error plus the list of Office.js APIs the code used that are not yet implemented. Edits synced before a script error remain applied.

ParameterTypeDescription
codestringrequiredOffice.js JavaScript to run against the active workbook. context (RequestContext) and Excel are in scope; call await context.sync() to flush writes.