Office.js is the programming interface Excel gives add-ins. When none of Oda's other steps can do a task, DataMind Oda in Excel can write a short piece of Office.js code and run it, for example to set a chart option the other steps lack or to make many small edits in one go. Every change the code asks for is checked and approved like Oda's other changes. This page covers when Oda uses code, how it runs, when it asks, and what it never does.
The code can call Oda's read steps, such as reading cells or searching the workbook, up to 50 times in one run. Changes the code made appear in the Changes panel under Oda's reply, like any other change.
| What the code does | Ask before edits | Accept edits | Skip all permissions |
|---|---|---|---|
| Reads the workbook | Runs | Runs | Runs |
| Changes only sheets the same code added, such as filling, formatting or charting a new sheet, or deleting it again | Asks | Runs | Runs |
| Any other change that removes nothing: cells of a sheet the code did not add, even cells Oda wrote, or the workbook's defined names | Asks | Asks | Runs |
| Changes how Excel calculates, such as switching to manual calculation | Asks | Asks | Runs |
| Deletes, clears or removes anything on a sheet the code did not add, moves or fills cells there, makes a change there that no other step makes, or makes a workbook-wide change only code makes, such as to a cell style or the document properties. The card shows such a change as Changes made by Office.js code (Excel.Shape.delete) on Logo that Oda cannot describe exactly | Asks | Asks | Runs |
| Puts a link on cells, to a web address or a place in the workbook | Asks | Asks | Asks |
| Something Oda never does, listed below | Refused | Refused | Refused |
So in Accept edits, a sync runs without a card only when every change in it lands on sheets the same run of the code added, or on charts, tables, rules and shapes it made there. Copying your cells onto such a sheet counts, as it only reads them. A chart there that takes its data from one of your sheets asks, and so do pivot tables, slicers, defined names and styles. A table whose address names no sheet asks as a change Oda cannot describe exactly, because Excel puts it on the sheet that is active. Cells Oda wrote earlier do not count as the code's own: changing them asks, too. Once the code moves your cells onto a sheet it added, no sheet counts as new for the rest of that run. When one sync makes several changes, one card lists them all and asks as the strictest of them would. See Permission modes and approvals in Excel.
A card for a sync of code takes the place of the message box and shows:
Answer with Allow, Don’t allow, or one of the answers under More ways to allow, the arrow beside Allow:
A card for a large or structural change can offer a snapshot sheet first, as other cards do. If what the sync changes is edited while the card waits, nothing of that sync runs, even after Allow.
Oda's code is refused, in every permission mode, when it tries to:
Such a step shows Oda’s code asked for something Oda never does, so nothing of that step ran. A
step that uses something your version of Excel does not have shows
Oda’s code used something this Excel does not have, so nothing of that step ran.
| Item | Limit |
|---|---|
| Running time | 90 seconds; time waiting for Excel, Oda's read steps or an approval card does not count |
| One run in all | 10 minutes, not counting the time approval cards wait |
| Syncs in one run | 200 |
| One sync | 10,000 steps, 50,000 written cells and 3 MB of steps |
| What the code returns | 40,000 characters |
A run that does more shows Oda’s code did more at once than one run may., and one that runs past
its time shows This took too long and was stopped. Stop ends the code at once, and a card that
is still waiting is answered Don’t allow.
Revert turn treats the code's changes as it treats the same changes by Oda's other steps: it puts back cell values the code wrote. A turn in which the code made a change only code makes, or a change Revert turn cannot undo for other steps either, is refused, and nothing is changed. Use Ctrl+Z where it works, a snapshot sheet, or ask Oda to change it back. See Review and undo Oda's changes.
Oda writes code only when all of these hold:
When the setting goes off while you work, Oda stops offering code, and a code step that was already
on its way shows
This tool was turned off for Oda in Excel, by your company or in your settings.
None of its other steps could do the task, for example a chart or shape setting they lack, or many small edits at once. Oda prefers its other steps whenever one fits.
No. The code runs apart from Excel, in the pane's sandbox. The pane checks each batch of changes the code asks for, asks you where your permission mode says so, and only then makes the change.
No. The sandbox has no network access and cannot reach your sign-in, your chats or the pane's stored files. Links the code puts on cells always ask, in every permission mode.
The later changes of the same code that remove nothing, until the code ends. Removals, links, changes to how Excel calculates and changes only code makes still ask, and the next piece of code starts asking again.
The code changes something outside the sheets it added: cells of your sheets, even cells Oda wrote, the workbook's names, styles or document properties, or how Excel calculates. Or it removes something, or makes a change none of Oda's other steps makes, which counts as a removal. Only changes to sheets the same code added run without a card. A link always asks.
Every change it made landed on a sheet the same code added, so nothing of yours changed. In Ask before edits such code still asks.
The card removes or deletes something on a sheet the code did not add, moves cells there, puts a link on cells, makes a change there that only code makes, changes how Excel calculates, or makes a workbook-wide change only code makes, such as to a cell style or the document properties. Each of those is asked separately. A card that removes, links, changes how Excel calculates or makes a change only code makes offers only Allow and Don’t allow, with no More ways to allow.
Yes. Open Settings from More options in the pane header and turn off Office.js code under What Oda can use. Your administrator can also turn it off for the whole company.
Nothing of that sync runs and the code stops. What earlier syncs changed stays, and the Changes panel lists it.