Microsoft Excel · Arazzo Workflow

Microsoft Excel Scratch Worksheet Lifecycle

Version 1.0.0

Create a temporary worksheet, read it, rename and reposition it, then delete it.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub AutomationData AnalysisMicrosoftMicrosoft-365OfficeSpreadsheetsArazzoWorkflows

Provider

microsoft-excel

Workflows

worksheet-lifecycle
Exercise create, get, update, and delete against a single scratch worksheet.
Creates a worksheet, fetches it to confirm it exists, patches its name and position, then removes it from the workbook.
5 steps inputs: itemId, position, renamedWorksheetName, worksheetName outputs: renamedTo, startingPosition, worksheetId
1
openSession
Open a persisting session so each mutation in the lifecycle is committed and observable by the next step.
2
createScratchSheet
Create the scratch worksheet and capture the id Excel assigns to it.
3
readScratchSheet
Fetch the worksheet by the id returned at creation to confirm it exists and to capture its starting position and visibility.
4
renameScratchSheet
Patch the worksheet's name and position. Excel applies both properties in a single PATCH and returns the updated worksheet.
5
deleteScratchSheet
Remove the scratch worksheet, leaving the workbook as it was found. This is destructive and cannot be undone through the API.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Microsoft Excel Scratch Worksheet Lifecycle
  summary: Create a temporary worksheet, read it, rename and reposition it, then delete it.
  description: >-
    The full create-read-update-delete lifecycle for a worksheet, which is what
    an integration test or a scratch-space integration needs: stand a sheet up,
    confirm it exists, mutate its properties, and clean it up so the workbook is
    left as it was found. The delete step is destructive and is the reason the
    flow reads the sheet back first. Every step spells out its request inline so
    the flow can be read and executed without opening the underlying OpenAPI.
  version: 1.0.0
sourceDescriptions:
- name: sessionsApi
  url: ../openapi/microsoft-excel-sessions-api-openapi.yml
  type: openapi
- name: worksheetsApi
  url: ../openapi/microsoft-excel-worksheets-api-openapi.yml
  type: openapi
workflows:
- workflowId: worksheet-lifecycle
  summary: Exercise create, get, update, and delete against a single scratch worksheet.
  description: >-
    Creates a worksheet, fetches it to confirm it exists, patches its name and
    position, then removes it from the workbook.
  inputs:
    type: object
    required:
    - itemId
    - worksheetName
    - renamedWorksheetName
    - position
    properties:
      itemId:
        type: string
        description: The drive item id of the workbook file.
      worksheetName:
        type: string
        description: The name to give the scratch worksheet on creation.
      renamedWorksheetName:
        type: string
        description: The name to rename the worksheet to during the update step.
      position:
        type: integer
        description: The zero-based position to move the worksheet to.
  steps:
  - stepId: openSession
    description: >-
      Open a persisting session so each mutation in the lifecycle is committed
      and observable by the next step.
    operationId: createWorkbookSession
    parameters:
    - name: item-id
      in: path
      value: $inputs.itemId
    requestBody:
      contentType: application/json
      payload:
        persistChanges: true
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      sessionId: $response.body#/id
  - stepId: createScratchSheet
    description: Create the scratch worksheet and capture the id Excel assigns to it.
    operationId: createWorksheet
    parameters:
    - name: item-id
      in: path
      value: $inputs.itemId
    - name: workbook-session-id
      in: header
      value: $steps.openSession.outputs.sessionId
    requestBody:
      contentType: application/json
      payload:
        name: $inputs.worksheetName
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      worksheetId: $response.body#/id
      createdName: $response.body#/name
  - stepId: readScratchSheet
    description: >-
      Fetch the worksheet by the id returned at creation to confirm it exists
      and to capture its starting position and visibility.
    operationId: getWorksheet
    parameters:
    - name: item-id
      in: path
      value: $inputs.itemId
    - name: worksheet-id-or-name
      in: path
      value: $steps.createScratchSheet.outputs.worksheetId
    - name: workbook-session-id
      in: header
      value: $steps.openSession.outputs.sessionId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      startingPosition: $response.body#/position
      visibility: $response.body#/visibility
  - stepId: renameScratchSheet
    description: >-
      Patch the worksheet's name and position. Excel applies both properties in
      a single PATCH and returns the updated worksheet.
    operationId: updateWorksheet
    parameters:
    - name: item-id
      in: path
      value: $inputs.itemId
    - name: worksheet-id-or-name
      in: path
      value: $steps.createScratchSheet.outputs.worksheetId
    - name: workbook-session-id
      in: header
      value: $steps.openSession.outputs.sessionId
    requestBody:
      contentType: application/json
      payload:
        name: $inputs.renamedWorksheetName
        position: $inputs.position
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      renamedTo: $response.body#/name
      newPosition: $response.body#/position
  - stepId: deleteScratchSheet
    description: >-
      Remove the scratch worksheet, leaving the workbook as it was found. This
      is destructive and cannot be undone through the API.
    operationId: deleteWorksheet
    parameters:
    - name: item-id
      in: path
      value: $inputs.itemId
    - name: worksheet-id-or-name
      in: path
      value: $steps.createScratchSheet.outputs.worksheetId
    - name: workbook-session-id
      in: header
      value: $steps.openSession.outputs.sessionId
    successCriteria:
    - condition: $statusCode == 204
  outputs:
    worksheetId: $steps.createScratchSheet.outputs.worksheetId
    startingPosition: $steps.readScratchSheet.outputs.startingPosition
    renamedTo: $steps.renameScratchSheet.outputs.renamedTo

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/microsoft-excel-worksheet-lifecycle-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.