Batch reports from a template
An extract becomes one .xlsx per branch, from the template built in Excel: Table, structured formulas, defined name, data validation and conditional formatting.
Octo for Excel and spreadsheets
An .xlsx is a package of XML that can be read and written without Excel installed. Octo generates batch reports from your template, audits legacy spreadsheets without opening macros, simulates scenarios on the real spreadsheet through the Excel API in Microsoft Graph without changing the file, and writes Office Scripts for Power Automate. The number that goes out, the tenant permission and the personal data stay with people.
Six possible deliverables, drawn from the research. All of them start with a copy and reading, all of them check the result by content, and all of them go to review by whoever owns the spreadsheet.
An extract becomes one .xlsx per branch, from the template built in Excel: Table, structured formulas, defined name, data validation and conditional formatting.
Non-positive quantities, discounts above the cap, dates outside the month and branches without a target go to a list of open items, not to the report. Money summed in Decimal.
Macros, external links, connections, pivot cache, #REF!, constants inside formulas, formulas that differ from their neighbors and very hidden sheets. Read-only; nothing is saved.
A non-persistent session in the Excel API in Graph: writes assumptions, recalculates with the real formulas and reads the result; when the session closes, the file stays the same.
Deliverable: scenarios side by side for the decisionA TypeScript script that standardizes an extract in blocks, creates a Table and a pivot table and returns a small summary, respecting 5 MB per call and 120 s in the flow.
Deliverable: a reviewable .osts script and a scheduled flowReads each workbook's connections and M code to know where each piece of data comes from and with whose credentials. Writes new queries for a person to review and paste.
Deliverable: map of sources per spreadsheetThe same Octo cycle, applied to Excel workbooks. Each arm has a narrow role; the ones who sign off on the number, grant the permission and answer for the data are people.
Inventory of the workbooks, Excel versions in use and where each file is stored: network, OneDrive or SharePoint.
Power Query, connections and external links of each spreadsheet; column types and money in Decimal.
Minimum permission in Graph, tokens outside the code, macros and personal data flagged (LGPD, Brazil's data protection law), including in the pivot cache.
Open XML file directly, the Excel API in Graph, Office Scripts with Power Automate or COM with a person present.
Generators, validators and scripts with the source of each limit noted in the file.
The script's total equal to Excel's recalculation, the PDF opened, a history line written. "The file was saved" is not a check.
Delivers the files and the manifest. Sending to the client, the board or the portal is done with a person's approval.
Templates, validation rules, permissions granted, who approved each batch and how to roll back.
Octo works with copies and reading; it writes to the production spreadsheet only with recorded approval. It does not decide the number that goes out, does not keep anyone's credentials and does not answer for the data.
The criteria Octo uses to choose, with the documented limit of each path.
| Task | Path | Notes |
|---|---|---|
| Generate reports from a template | openpyxl + CSV | Writes the formula; Excel does the calculating |
| Preserve pivots and charts | Template built in Excel | openpyxl preserves pivots, doesn't create them; shapes may be lost |
| Audit a folder of spreadsheets | ZIP + openpyxl, read-only | .xls is listed for conversion |
| Simulate scenarios on the real spreadsheet | Graph, non-persistent session | OneDrive for Business and SharePoint only; the file doesn't change |
| Write the approved scenario | Graph, persistent session | Delegated permission; requests in sequence |
| Export to PDF | ?format=pdf | Source of up to 2 MB |
| Standardize an extract and create a pivot | Office Scripts | 5 MB per call, 5 million cells per range |
| Run every day with no one there | Power Automate + Office Scripts | 1,600 runs per user per day; 120 s |
| Inventory Power Query | Reading the connections and the M code | Refreshing stays with Excel |
| Refresh everything the way a person would | COM on a workstation with a user | Not supported by Microsoft as a service |
Three steps. Each one only makes sense after the previous one has shown results on your team.
A proposal, not a promise
Octo shows what is in the spreadsheets and what is broken, without writing anything.
Reports come out of the team's template, with validation before and a check after.
Simulation in Graph, approved writes and Power Automate flows with reviewed Office Scripts.
Every point below has a source published by Microsoft (Learn and Support), by the package's official repository (PyPI, NuGet, PowerShell Gallery) or in Brazilian federal law. The examples are scripts to follow, not runs. The sources are in the next section.
5
points with a published source, each with its reference shown alongside.
.xls is not accepted.Source: learn.microsoft.com, Working with Excel in Microsoft GraphcreateSession requires delegated Files.ReadWrite; app permissions are not accepted. A persistent session expires after about 5 min idle, a non-persistent one after about 7.Source: learn.microsoft.com, workbook: createSession and Excel in Graphdata_only=True, it returns the value saved the last time Excel read the sheet.Source: openpyxl.readthedocs.io, pivot and tutorialOcto prepares everything, but it does not sign. The document of record stays with whoever is accountable for it.
Surveys, organizes and produces the files: documents, spreadsheets, presentations, schedules, inventories and check reports, on file and through the APIs, without sending or publishing anything.
Deliverable: material ready to checkWhoever is accountable for the document, the spreadsheet or the schedule checks what Octo delivered before approving. If something doesn't add up, it goes back to Octo with the correction.
Step: checked by the person accountableOcto does not sign, approve or send. The document owner reviews and signs; the project manager approves the baseline; the Microsoft 365 administrator grants consent for permissions; the data protection officer approves anything that goes out with personal data.
Approval: document owner and 365 administratorMicrosoft documentation (Graph, Office Scripts, Power Query, lifecycle, Excel specifications) and the openpyxl library documentation, consulted on Oct 30, 2026.
The assessment starts with a read-only audit of the spreadsheets that matter. You get the list of what is broken, what depends on whom and the questions only your team can answer, and you decide with that in hand.