Create workbook
Create a new, empty Excel workbook in OneDrive or SharePoint, optionally with named sheets.
Command in the Microsoft 365 toolkit · id ooa.microsoft365/excel_create_workbook · 6 inputs, 2 outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Access token | Credential | No | Microsoft Graph access token from the vault; or leave it empty and choose a connection that signs in, which gets and renews the token. | |
| Remote path | String | No | Path of the new workbook, ending in .xlsx. | |
| Sheet names | List | No | Names of the sheets; one sheet called Sheet1 when empty. | |
| If exists | String | No | fail | When a file of that name exists: fail, rename (add a number) or replace it. |
| Drive | String | No | me/drive | Whose files: me/drive (your OneDrive), a person (ann@acme.com), a SharePoint site (contoso.sharepoint.com:/sites/Finance), a library of a site by name (contoso.sharepoint.com:/sites/Finance:/Invoices), or sites/{site-id}/drive or drives/{drive-id}. With an app sign-in, name a person or site. |
| Endpoint address | String | No | https://graph.microsoft.com/v1.0 | Graph endpoint; change only for national clouds or testing. |
Outputs
| Output | Type | What it is |
|---|---|---|
| item_id | String | Drive item id of the workbook. |
| web_url | String | Link to open the workbook. |