Skip to content
Agent Tools

executeOfficeJs

Execute an Office.js code snippet against the active workbook and persist the result. Returns any error plus the list of Office.js APIs the code used that are not yet implemented.

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