Open workbook
Open an .xlsx or .xls workbook (a local path, onedrive:path or a pasted SharePoint or OneDrive link), or a .csv or .txt file (one sheet, saved back as text), or create a new one, as a named session; can open encrypted files, open read-only and skip hidden sheets.
Command in the Excel toolkit · id ooa.excel/open · 16 inputs (1 required), no outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Path | File | Yes | Workbook path. | |
| Session | String | No | excel | Session name used by later steps. |
| Create | Boolean | No | false | Create the workbook when it does not exist. |
| Sheet | String | No | Sheet to make active after opening; the sheet saved as active when empty. | |
| Read only | Boolean | No | false | Open for reading only: save over the opened file is refused, save_as to another file still works. |
| Password | Credential | No | Password of an encrypted workbook; save keeps the file encrypted with the same password. | |
| First row is the header | Boolean | No | true | Whether sheets start with a row of column names; used by get_all_cells, get_range, filter and sort_range when their header input is empty. |
| Access token | Credential | No | For a path starting onedrive: (onedrive:Reports/sales.xlsx): a Microsoft Graph access token from the vault. The workbook is downloaded, and save and close with save upload it back. | |
| Drive | String | No | me/drive | For onedrive: paths: me/drive (the signed-in user's OneDrive), sites/{site-id}/drive (a SharePoint library) or drives/{drive-id}. |
| Graph address (URL) | String | No | https://graph.microsoft.com/v1.0 | Microsoft Graph address (national clouds, tests). |
| Edit password | Credential | No | Password to modify the file (Excel's write access password); a wrong one stops the step. Without it such a file still opens. | |
| Skip hidden sheets | Boolean | No | false | Leave hidden sheets out: sheet lists, counts and positions only see visible sheets, and later steps cannot use a hidden sheet. |
| Sensitivity label | String | No | Sensitivity label id (a GUID) to put on the workbook; it may come from the vault. | |
| Label site ID | String | No | Microsoft 365 tenant id (a GUID) the label belongs to. | |
| Continue if label fails | Boolean | No | false | When the label cannot be set, log a warning and go on instead of stopping. |
| Share | Boolean | No | false | Agents this one runs may use it. |