Logo

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, default null): SharePoint site ID to save into its default document library. Provide siteId, driveId, or neither (OneDrive).
  • driveId string (nullable, default null): A specific document library drive ID to save into. Omit or null to use the signed-in user's OneDrive.
  • parentItemId string (nullable, default null): The drive item ID of the folder to save into. Omit or null to save to the drive root.
  • fileName string (required): The name of the workbook to create, including the .xlsx extension (e.g. "Q3 Report.xlsx").
  • worksheetNames array<string> (nullable, default null): Names for the worksheets to create. Omit or null for 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, default null): The drive ID containing the workbook (for SharePoint files). Omit or null to use the signed-in user's OneDrive.
  • name string (nullable, default null): Name for the new worksheet. Omit or null to 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, default null): The drive ID containing the workbook (for SharePoint files). Omit or null to 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, default null): The drive ID containing the workbook (for SharePoint files). Omit or null to use the signed-in user's OneDrive.
  • worksheetIdOrName string (required): Worksheet ID or current name (e.g. "Sheet1").
  • name string (nullable, default null): New name for the worksheet. Omit or null to leave unchanged.
  • position int (nullable, default null): New zero-based position for the worksheet. Omit or null to leave unchanged.
  • visibility string (nullable, default null): New visibility: "Visible", "Hidden", or "VeryHidden". Omit or null to 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, default null): The drive ID containing the workbook (for SharePoint files). Omit or null to 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, default null): The drive ID containing the workbook (for SharePoint files). Omit or null to 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, default null): Cell values as a 2D array matching the range dimensions. Omit or null to leave values unchanged.
  • formulas array<array<string>> (nullable, default null): Cell formulas as a 2D array (e.g. [["=A1+B1"]]). Omit or null to leave formulas unchanged.
  • numberFormat array<array<string>> (nullable, default null): Number formats as a 2D array (e.g. [["0.00%"]]). Omit or null to 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, default null): The drive ID containing the workbook (for SharePoint files). Omit or null to 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, default null): The drive ID containing the workbook (for SharePoint files). Omit or null to 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 (default true): 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, default null): The drive ID containing the workbook (for SharePoint files). Omit or null to use the signed-in user's OneDrive.
  • worksheetIdOrName string (nullable, default null): Worksheet ID or name to scope the listing to a single sheet. Omit or null to 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, default null): The drive ID containing the workbook (for SharePoint files). Omit or null to 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, default null): The drive ID containing the workbook (for SharePoint files). Omit or null to 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, default null): The drive ID containing the workbook (for SharePoint files). Omit or null to 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, default null): The drive ID containing the workbook (for SharePoint files). Omit or null to 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, default null): How to plot the series: "Auto" (default), "Columns", or "Rows". Omit or null for 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, default null): The drive ID containing the workbook (for SharePoint files). Omit or null to 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, default null): The drive ID containing the workbook (for SharePoint files). Omit or null to 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, default null): New name for the chart. Omit or null to leave unchanged.
  • height number (nullable, default null): New height in points. Omit or null to leave unchanged.
  • width number (nullable, default null): New width in points. Omit or null to leave unchanged.
  • top number (nullable, default null): New distance from the top of the worksheet in points. Omit or null to leave unchanged.
  • left number (nullable, default null): New distance from the left of the worksheet in points. Omit or null to 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, default null): The drive ID containing the workbook (for SharePoint files). Omit or null to 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, default null): The drive ID containing the workbook (for SharePoint files). Omit or null to 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, default null): Desired image width in pixels. Omit or null for the default size.
  • height int (nullable, default null): Desired image height in pixels. Omit or null for the default size.
  • fittingMode string (nullable, default null): How the chart fits the requested dimensions: "Fit", "FitAndCenter", or "Fill". Only applied when both width and height are 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, default null): SharePoint site ID to save into its default document library. Provide siteId, driveId, or neither (OneDrive).
  • driveId string (nullable, default null): A specific document library drive ID to save into. Omit or null to use the signed-in user's OneDrive.
  • parentItemId string (nullable, default null): The drive item ID of the folder to save into. Omit or null to save to the drive root.
  • fileName string (required): The name of the document to create, including the .docx extension (e.g. "Summary.docx").
  • title string (nullable, default null): An optional heading rendered at the top of the document. Omit or null for 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, default null): SharePoint site ID to save into its default document library. Provide siteId, driveId, or neither (OneDrive).
  • driveId string (nullable, default null): A specific document library drive ID to save into. Omit or null to use the signed-in user's OneDrive.
  • parentItemId string (nullable, default null): The drive item ID of the folder to save into. Omit or null to save to the drive root.
  • fileName string (required): The name of the presentation to create, including the .pptx extension (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, default null): The slide body. Use newlines to separate bullet points. Omit or null for a title-only slide.
  • 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.