Microsoft 365
Authentication Type: OAuth
Description: Microsoft 365 tools for Excel workbook CRUD, chart management, table operations, Word document generation, and PowerPoint presentation creation.
Beta Notice
This tool is currently in beta testing and not yet available for general use.
To get the Microsoft 365 tool added to your Cotera workspace, please contact our support team at support.cotera.co.
Workbooks
Create and manage Excel workbooks in OneDrive or SharePoint.
Create Workbook
Create a new, blank Excel workbook (.xlsx) in OneDrive or SharePoint.
Operation Type: Mutation (Write)
Parameters:
- siteId
string(nullable, defaultnull): SharePoint site ID to save into its default document library. ProvidesiteId,driveId, or neither (OneDrive). - driveId
string(nullable, defaultnull): A specific document library drive ID to save into. Omit ornullto use the signed-in user's OneDrive. - parentItemId
string(nullable, defaultnull): The drive item ID of the folder to save into. Omit ornullto save to the drive root. - fileName
string(required): The name of the workbook to create, including the.xlsxextension (e.g."Q3 Report.xlsx"). - worksheetNames
array<string>(nullable, defaultnull): Names for the worksheets to create. Omit ornullfor a single default"Sheet1". - conflictBehavior
string(nullable, default"replace"): What to do if a file with the same name exists:"replace"(default),"rename", or"fail".
Returns:
The created workbook's drive item details, including its ID for use in subsequent worksheet and range operations.
Worksheets
Add, list, update, and delete worksheets within an Excel workbook.
Add Worksheet
Add a new worksheet to an Excel workbook.
Operation Type: Mutation (Write)
Parameters:
- fileId
string(required): The OneDrive/SharePoint drive item ID of the Excel workbook. - driveId
string(nullable, defaultnull): The drive ID containing the workbook (for SharePoint files). Omit ornullto use the signed-in user's OneDrive. - name
string(nullable, defaultnull): Name for the new worksheet. Omit ornullto let Excel choose a default name.
Returns:
The created worksheet object including its ID and name.
List Worksheets
List all worksheets in an Excel workbook.
Operation Type: Query (Read)
Parameters:
- fileId
string(required): The OneDrive/SharePoint drive item ID of the Excel workbook. - driveId
string(nullable, defaultnull): The drive ID containing the workbook (for SharePoint files). Omit ornullto use the signed-in user's OneDrive.
Returns:
An array of worksheet objects, each with an id, name, position, and visibility.
Update Worksheet
Update a worksheet's name, position, or visibility.
Operation Type: Mutation (Write)
Parameters:
- fileId
string(required): The OneDrive/SharePoint drive item ID of the Excel workbook. - driveId
string(nullable, defaultnull): The drive ID containing the workbook (for SharePoint files). Omit ornullto use the signed-in user's OneDrive. - worksheetIdOrName
string(required): Worksheet ID or current name (e.g."Sheet1"). - name
string(nullable, defaultnull): New name for the worksheet. Omit ornullto leave unchanged. - position
int(nullable, defaultnull): New zero-based position for the worksheet. Omit ornullto leave unchanged. - visibility
string(nullable, defaultnull): New visibility:"Visible","Hidden", or"VeryHidden". Omit ornullto leave unchanged.
Returns:
The updated worksheet object.
Delete Worksheet
Delete a worksheet from an Excel workbook.
Operation Type: Mutation (Write)
Parameters:
- fileId
string(required): The OneDrive/SharePoint drive item ID of the Excel workbook. - driveId
string(nullable, defaultnull): The drive ID containing the workbook (for SharePoint files). Omit ornullto use the signed-in user's OneDrive. - worksheetIdOrName
string(required): Worksheet ID or name to delete (e.g."Sheet1").
Returns:
Confirmation that the worksheet was deleted.
Ranges
Read and write cell data within an Excel worksheet.
Update Range
Update cell values, formulas, or number formats in a range.
Operation Type: Mutation (Write)
Parameters:
- fileId
string(required): The OneDrive/SharePoint drive item ID of the Excel workbook. - driveId
string(nullable, defaultnull): The drive ID containing the workbook (for SharePoint files). Omit ornullto use the signed-in user's OneDrive. - worksheetIdOrName
string(required): Worksheet ID or name (e.g."Sheet1"). - range
string(required): Cell range in A1 notation (e.g."A1:D10"). Must match the shape of the values/formulas provided. - values
array<array<any>>(nullable, defaultnull): Cell values as a 2D array matching the range dimensions. Omit ornullto leave values unchanged. - formulas
array<array<string>>(nullable, defaultnull): Cell formulas as a 2D array (e.g.[["=A1+B1"]]). Omit ornullto leave formulas unchanged. - numberFormat
array<array<string>>(nullable, defaultnull): Number formats as a 2D array (e.g.[["0.00%"]]). Omit ornullto leave formats unchanged.
Returns:
The updated range object reflecting the new values, formulas, and formats.
Clear Range
Clear values, formats, or both from a range.
Operation Type: Mutation (Write)
Parameters:
- fileId
string(required): The OneDrive/SharePoint drive item ID of the Excel workbook. - driveId
string(nullable, defaultnull): The drive ID containing the workbook (for SharePoint files). Omit ornullto use the signed-in user's OneDrive. - worksheetIdOrName
string(required): Worksheet ID or name (e.g."Sheet1"). - range
string(required): Cell range in A1 notation (e.g."A1:D10"). - applyTo
string(nullable, default"All"): What to clear:"All"(default),"Formats", or"Contents"(values only).
Returns:
Confirmation that the range was cleared.
Tables
Create and manage structured tables within an Excel worksheet.
Add Table
Add a table from a range in a worksheet.
Operation Type: Mutation (Write)
Parameters:
- fileId
string(required): The OneDrive/SharePoint drive item ID of the Excel workbook. - driveId
string(nullable, defaultnull): The drive ID containing the workbook (for SharePoint files). Omit ornullto use the signed-in user's OneDrive. - worksheetIdOrName
string(required): Worksheet ID or name that contains the range (e.g."Sheet1"). - address
string(required): The range the table covers, in A1 notation (e.g."A1:D5"). - hasHeaders
boolean(defaulttrue): Whether the first row of the range is a header row.
Returns:
The created table object, including its ID and name.
List Tables
List tables in a worksheet or the entire workbook.
Operation Type: Query (Read)
Parameters:
- fileId
string(required): The OneDrive/SharePoint drive item ID of the Excel workbook. - driveId
string(nullable, defaultnull): The drive ID containing the workbook (for SharePoint files). Omit ornullto use the signed-in user's OneDrive. - worksheetIdOrName
string(nullable, defaultnull): Worksheet ID or name to scope the listing to a single sheet. Omit ornullto list all tables in the workbook.
Returns:
An array of table objects, each with an id, name, and the address of the range it covers.
List Table Rows
List data rows in an Excel table.
Operation Type: Query (Read)
Parameters:
- fileId
string(required): The OneDrive/SharePoint drive item ID of the Excel workbook. - driveId
string(nullable, defaultnull): The drive ID containing the workbook (for SharePoint files). Omit ornullto use the signed-in user's OneDrive. - tableIdOrName
string(required): Table ID or name to read rows from (e.g."Table1").
Returns:
An array of row objects. Each row includes an index (zero-based) and a values array matching the table's column order. Use the index with Update Table Row or Delete Table Row.
Update Table Row
Update a row in an Excel table by index.
Operation Type: Mutation (Write)
Parameters:
- fileId
string(required): The OneDrive/SharePoint drive item ID of the Excel workbook. - driveId
string(nullable, defaultnull): The drive ID containing the workbook (for SharePoint files). Omit ornullto use the signed-in user's OneDrive. - tableIdOrName
string(required): Table ID or name (e.g."Table1"). - index
int(required): Zero-based index of the data row to update (from List Table Rows). - values
array<array<any>>(required): New row values as a single-row 2D array (e.g.[["a", "b", "c"]]).
Returns:
The updated row object.
Delete Table Row
Delete a row from an Excel table by index.
Operation Type: Mutation (Write)
Parameters:
- fileId
string(required): The OneDrive/SharePoint drive item ID of the Excel workbook. - driveId
string(nullable, defaultnull): The drive ID containing the workbook (for SharePoint files). Omit ornullto use the signed-in user's OneDrive. - tableIdOrName
string(required): Table ID or name (e.g."Table1"). - index
int(required): Zero-based index of the data row to delete (from List Table Rows).
Returns:
Confirmation that the row was deleted.
Charts
Add, list, update, delete, and render charts in an Excel worksheet.
Add Chart
Add a chart to a worksheet from a range of data.
Operation Type: Mutation (Write)
Parameters:
- fileId
string(required): The OneDrive/SharePoint drive item ID of the Excel workbook. - driveId
string(nullable, defaultnull): The drive ID containing the workbook (for SharePoint files). Omit ornullto use the signed-in user's OneDrive. - worksheetIdOrName
string(required): Worksheet ID or name to add the chart to (e.g."Sheet1"). - type
string(required): Chart type, e.g."ColumnClustered","ColumnStacked","BarClustered","Line","LineMarkers","Pie". - sourceData
string(required): The range that holds the chart data, in A1 notation (e.g."A1:B10"). - seriesBy
string(nullable, defaultnull): How to plot the series:"Auto"(default),"Columns", or"Rows". Omit ornullfor Auto.
Returns:
The created chart object, including its id and name.
List Charts
List charts in a worksheet.
Operation Type: Query (Read)
Parameters:
- fileId
string(required): The OneDrive/SharePoint drive item ID of the Excel workbook. - driveId
string(nullable, defaultnull): The drive ID containing the workbook (for SharePoint files). Omit ornullto use the signed-in user's OneDrive. - worksheetIdOrName
string(required): Worksheet ID or name to list charts from (e.g."Sheet1").
Returns:
An array of chart objects, each with an id, name, height, width, top, and left.
Update Chart
Update a chart's name, size, or position.
Operation Type: Mutation (Write)
Parameters:
- fileId
string(required): The OneDrive/SharePoint drive item ID of the Excel workbook. - driveId
string(nullable, defaultnull): The drive ID containing the workbook (for SharePoint files). Omit ornullto use the signed-in user's OneDrive. - worksheetIdOrName
string(required): Worksheet ID or name that contains the chart (e.g."Sheet1"). - chartName
string(required): The current name (or ID) of the chart to update. - name
string(nullable, defaultnull): New name for the chart. Omit ornullto leave unchanged. - height
number(nullable, defaultnull): New height in points. Omit ornullto leave unchanged. - width
number(nullable, defaultnull): New width in points. Omit ornullto leave unchanged. - top
number(nullable, defaultnull): New distance from the top of the worksheet in points. Omit ornullto leave unchanged. - left
number(nullable, defaultnull): New distance from the left of the worksheet in points. Omit ornullto leave unchanged.
Returns:
The updated chart object.
Delete Chart
Delete a chart from a worksheet.
Operation Type: Mutation (Write)
Parameters:
- fileId
string(required): The OneDrive/SharePoint drive item ID of the Excel workbook. - driveId
string(nullable, defaultnull): The drive ID containing the workbook (for SharePoint files). Omit ornullto use the signed-in user's OneDrive. - worksheetIdOrName
string(required): Worksheet ID or name that contains the chart (e.g."Sheet1"). - chartName
string(required): The name (or ID) of the chart to delete.
Returns:
Confirmation that the chart was deleted.
Get Chart Image
Get a chart as a base64-encoded image.
Operation Type: Query (Read)
Parameters:
- fileId
string(required): The OneDrive/SharePoint drive item ID of the Excel workbook. - driveId
string(nullable, defaultnull): The drive ID containing the workbook (for SharePoint files). Omit ornullto use the signed-in user's OneDrive. - worksheetIdOrName
string(required): Worksheet ID or name that contains the chart (e.g."Sheet1"). - chartName
string(required): The name (or ID) of the chart to render. - width
int(nullable, defaultnull): Desired image width in pixels. Omit ornullfor the default size. - height
int(nullable, defaultnull): Desired image height in pixels. Omit ornullfor the default size. - fittingMode
string(nullable, defaultnull): How the chart fits the requested dimensions:"Fit","FitAndCenter", or"Fill". Only applied when bothwidthandheightare set.
Returns:
A base64-encoded PNG string of the rendered chart.
Documents
Create Word documents in OneDrive or SharePoint.
Create Document
Create a new Word (.docx) document in OneDrive or SharePoint with paragraphs.
Operation Type: Mutation (Write)
Parameters:
- siteId
string(nullable, defaultnull): SharePoint site ID to save into its default document library. ProvidesiteId,driveId, or neither (OneDrive). - driveId
string(nullable, defaultnull): A specific document library drive ID to save into. Omit ornullto use the signed-in user's OneDrive. - parentItemId
string(nullable, defaultnull): The drive item ID of the folder to save into. Omit ornullto save to the drive root. - fileName
string(required): The name of the document to create, including the.docxextension (e.g."Summary.docx"). - title
string(nullable, defaultnull): An optional heading rendered at the top of the document. Omit ornullfor no heading. - paragraphs
array<string>(required): The body of the document, one string per paragraph. - conflictBehavior
string(nullable, default"replace"): What to do if a file with the same name exists:"replace"(default),"rename", or"fail".
Returns:
The created document's drive item details, including its ID and a link to open it.
Presentations
Create PowerPoint presentations in OneDrive or SharePoint.
Create Presentation
Create a new PowerPoint (.pptx) presentation in OneDrive or SharePoint with slides.
Operation Type: Mutation (Write)
Parameters:
- siteId
string(nullable, defaultnull): SharePoint site ID to save into its default document library. ProvidesiteId,driveId, or neither (OneDrive). - driveId
string(nullable, defaultnull): A specific document library drive ID to save into. Omit ornullto use the signed-in user's OneDrive. - parentItemId
string(nullable, defaultnull): The drive item ID of the folder to save into. Omit ornullto save to the drive root. - fileName
string(required): The name of the presentation to create, including the.pptxextension (e.g."Kickoff.pptx"). - slides
array<object>(required): The slides to create, in order. Each object has:- title
string(required): The slide title. - body
string(nullable, defaultnull): The slide body. Use newlines to separate bullet points. Omit ornullfor a title-only slide.
- title
- conflictBehavior
string(nullable, default"replace"): What to do if a file with the same name exists:"replace"(default),"rename", or"fail".
Returns:
The created presentation's drive item details, including its ID and a link to open it.