Skip to main content

Get Workbook

Opens an Excel workbook from OneDrive or SharePoint and retrieves its metadata. This node is required before performing any operations on an Excel file.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If the ContinueOnError property is set to true, no error is caught when the project is executed even if a Catch node is used.

Input

  • Client Id - The client ID from the Connect node (optional if using direct credentials).
  • File Path - Path to the Excel file. Can be:
    • OneDrive path: /Documents/report.xlsx
    • SharePoint full URL: https://company.sharepoint.com/sites/finance/Documents/report.xlsx

Options

  • Credentials - OAuth2 credentials (optional, alternative to using Client ID).

Output

  • Workbook Info - Object containing workbook metadata:

    • Id: Workbook ID (use this with other Excel nodes)
    • Name: File name
    • Size: File size in bytes
    • WebUrl: URL to open file in Excel Online
    • LastModifiedDateTime: When file was last modified
    • CreatedDateTime: When file was created
    • MimeType: File MIME type
  • Workbook Id - The workbook ID to use with other Excel nodes (worksheet, cell, range operations).

Examples

Open File from OneDrive:

// Input
Client Id: ${client_id}
File Path: "/Documents/Sales Report.xlsx"

// Output - workbook_id
"01ABC123DEF456GHI789"

// Output - workbook info
{
"Id": "01ABC123DEF456GHI789",
"Name": "Sales Report.xlsx",
"Size": 52480,
"WebUrl": "https://onedrive.live.com/...",
"LastModifiedDateTime": "2025-01-15T10:30:00Z"
}

Open File from SharePoint:

// Input
File Path: "https://company.sharepoint.com/sites/finance/Documents/Q1-Report.xlsx"

// The node automatically detects SharePoint URLs and processes them accordingly

Typical Workflow:

Connect
→ List Files (get available Excel files)
→ Get Workbook (open specific file)
→ Get Worksheet (access worksheet)
→ Get Range (read data)

Use Cases

  • Open Excel files for reading data
  • Get workbook metadata before processing
  • Access Excel files in SharePoint document libraries
  • Verify file exists before performing operations
  • Retrieve file information for auditing

Tips

  • Always store the Workbook Id output - you'll need it for all subsequent Excel operations
  • For OneDrive files, use simple paths starting with /
  • For SharePoint files, you can use full URLs or use List Files first to get the file ID
  • The workbook remains accessible until you disconnect or the flow ends
  • File paths are case-sensitive on some systems
  • Use forward slashes (/) for paths, not backslashes ()

Common Errors

ErrInvalidArg - "File path cannot be empty"

  • Solution: Provide a valid path to an Excel file

ErrNotFound - "File not found"

  • Solution: Verify the file path is correct and the file exists. Use List Files to discover available files.

ErrGraph - "Microsoft Graph Error"

  • Solution: Check that the file is an Excel file (.xlsx) and you have permission to access it

ErrInvalidArg - "Invalid SharePoint URL format"

  • Solution: Ensure SharePoint URLs include the full path with domain, site, and file