1. Overview
Microsoft Excel is a powerful spreadsheet application developed by Microsoft, widely used for organizing, analyzing, and visualizing data. It is a core component of the Microsoft 365 suite of productivity software.
With the GoInsight Microsoft Excel node, you can seamlessly integrate spreadsheet automation into your workflows. This allows you to manage the entire lifecycle of your Excel files stored in OneDrive, from creation to detailed data manipulation. Key capabilities include:
- Workbook Management: Create, list, and delete entire Excel workbook files in your OneDrive.
- Worksheet Operations: Add, delete, list, and clear worksheets within a specific workbook.
- Data Handling: Read data from sheets and tables, append new data to sheets, and update existing cell ranges.
- Table Management: Create and delete tables within a worksheet, manage their columns and rows, and convert them back to standard ranges.
2. Prerequisites
Before using this node, you need to have a valid Microsoft account with a subscription that includes OneDrive access (e.g., Microsoft 365). You may also need appropriate permissions within your Microsoft organization to grant API access to GoInsight for managing files.
3. Credentials
For a detailed guide on how to obtain and configure your credentials, please refer to our official documentation: Credentials Configuration Guide.
4. Supported Operations
Summary
This node primarily operates on resources such as Workbook, Sheet, Table, Column, and Row / Data.
| Resource | Operation | Description |
|---|---|---|
| Workbook | Create a Workbook | Create a new Excel workbook in the user's OneDrive. |
| Workbook | Delete Workbook | Permanently delete a specified Excel workbook from OneDrive. |
| Workbook | Get Workbooks | Retrieve a list of Excel workbooks from the user's OneDrive. |
| Sheet | Add a Sheet to a Workbook | Add a new worksheet to a specified Excel workbook. |
| Sheet | Delete Sheet | Delete a specified worksheet from an Excel workbook. |
| Sheet | Get Sheets | Retrieve the list of sheets from an Excel workbook. |
| Sheet | Clear a Sheet | Clear content from a specified worksheet in an Excel workbook. |
| Sheet | Copy Sheet to Workbook | Copy an entire worksheet from one Excel workbook to another. |
| Sheet | Update Sheet | Update properties or write data to a specific range in an Excel worksheet. |
| Table | Create a Table | Create a new table in a specified worksheet. |
| Table | Delete a Table | Delete a specified table from an Excel workbook. |
| Table | Convert to Range | Convert a table to a normal cell range in an Excel workbook. |
| Column | Get Columns | Retrieve column data from a specified table in an Excel workbook. |
| Column | Lookup a Column | Lookup detailed information about a specific column in an Excel table. |
| Row / Data | Get Rows | Retrieve row data from a specified table in an Excel workbook. |
| Row / Data | Get Rows from Sheet | Retrieve row data from a specified worksheet in an Excel workbook. |
| Row / Data | Get Rows from Sheet with Range | Gets the range object specified by the address or name. |
| Row / Data | Append Data to Sheet | Append data to a specified worksheet in an Excel workbook. |
| Row / Data | Append Rows to Table | Append rows to a specified table in an Excel workbook. |
| Row / Data | Append or Update Sheet | Append or update row data in a worksheet (Upsert). |
Operation Details
Create a Workbook
Create a new Excel workbook in user's OneDrive using Microsoft Graph API. Requires file name parameter. Returns new workbook metadata including ID, name, and web URL.
Input Parameters:
- FileName: Name for the new Excel workbook. The .xlsx extension will be added automatically if not provided. Example: 'quarterly_report' will create 'quarterly_report.xlsx'. File name should not exceed 255 characters and cannot contain special characters: \ / : * ? " < > |
Output:
- Workbook (object): The newly created workbook metadata object. Contains the following fields: id, name, webUrl, createdDateTime, lastModifiedDateTime, size, and createdBy. Empty object {} if creation failed.
- OriginalStatusCode (number): The original HTTP status code returned by Microsoft Graph API. Default 0 means the request did not reach upstream. Common values: 0=Did not reach upstream, 200/201=Success, 401=Token expired, 409=File already exists, 429=Rate limited, 5xx=Server error.
- StatusCode (number): Operation status code: -1=Parameter validation error, 200=Operation completed, 500=System error.
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Delete Workbook
Delete a specified Excel workbook from user's OneDrive using Microsoft Graph API. Requires user ID and workbook ID parameters. Returns success status, status code, and error message.
Input Parameters:
- WorkbookId: ⚠️ DESTRUCTIVE OPERATION WARNING: This action permanently deletes the ENTIRE workbook file from OneDrive/SharePoint. All sheets, data, formulas, and formatting will be permanently removed. However, the deleted file is moved to OneDrive Recycle Bin and can be restored within 30 days. The unique identifier (drive item ID) of the Excel workbook to delete.
Output:
- OriginalStatusCode (number): The original HTTP status code returned by Microsoft Graph API. Values: 204 (successfully deleted), 401 (authentication failed), 404 (workbook not found), 429 (rate limited), 400 (invalid request), 0 (request did not reach upstream).
- StatusCode (number): Operation status code indicating the execution result. Values: -1 (Parameter validation error), 200 (Request completed), 500 (System/network error).
- ErrorMessage (string): Detailed error message. Empty string indicates successful operation (workbook permanently deleted and moved to OneDrive Recycle Bin for 30 days).
Get Workbooks
Retrieve a list of Excel workbooks from the user's OneDrive using Microsoft Graph API. This operation fetches all .xlsx files with their IDs, names, and web URLs. Requires a valid access token with delegated permissions. Returns array of workbook objects containing id, name, and webUrl fields along with status code and error message.
Options:
- Limit: Maximum number of workbooks to return. Default: 100. Set to 0 to retrieve all workbooks without limit. Example: 10 (returns maximum 10 workbooks). ⚠️ IMPORTANT: This action only returns Excel files (.xlsx and .xls formats).
Output:
- Workbooks (object-array): Array of Excel workbook objects found in user's OneDrive. Each object contains: id, name, webUrl, createdDateTime, lastModifiedDateTime, size, and createdBy.
- OriginalStatusCode (number): The original HTTP status code returned by Microsoft Graph API. Default value is 0.
- StatusCode (number): Operation status code: 200 (Success), -1 (Parameter validation error), 500 (System error).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Add a Sheet to a Workbook
Add a new worksheet to a specified Excel workbook using Microsoft Graph API. Requires workbook ID, and sheet name parameters. Returns new sheet object with id, name, and position along with status code and error message.
Input Parameters:
- WorkbookId: The unique identifier (drive item ID) of the Excel workbook in OneDrive/SharePoint - think of it as the file's 'passport number' in Microsoft's cloud storage.
- SheetName: The name for the new worksheet to add to the workbook. Important: Must be unique within the workbook (adding a duplicate name will return OriginalStatusCode=409).
Output:
- NewSheet (object): The newly created worksheet metadata object. Empty object ({}) if operation failed. When successful, contains: 'id', 'name', 'position', and 'visibility'.
- OriginalStatusCode (number): The original HTTP status code returned by Microsoft Graph API. Values: 200/201 (success), 401 (authentication failed), 404 (workbook not found), 409 (duplicate sheet name), 429 (rate limited), 0 (request did not reach upstream).
- StatusCode (number): Operation status code indicating the execution result. Values: -1 (Parameter validation error), 200 (Request completed), 500 (System/network error).
- ErrorMessage (string): Detailed error message. Empty string indicates successful operation (new worksheet created).
Delete Sheet
Delete a specified worksheet from an Excel workbook using Microsoft Graph API. Requires workbook ID, and sheet name parameters. Returns success status, status code, and error message.
Input Parameters:
- WorkbookId: The unique identifier (drive item ID) of the Excel workbook in OneDrive/SharePoint - think of it as the file's 'passport number' in Microsoft's cloud storage.
- SheetName: The name of the worksheet to delete. This is the sheet tab name visible at the bottom of the Excel file. ⚠️ Critical Warning: This action permanently deletes the sheet and cannot be undone.
Output:
- OriginalStatusCode (number): The original HTTP status code returned by Microsoft Graph API. Values: 204 (deletion successful), 401 (authentication failed), 404 (worksheet/workbook not found), 429 (rate limited), 400 (invalid request), 0 (request did not reach upstream).
- StatusCode (number): Operation status code indicating the execution result. Values: -1 (Parameter validation error), 200 (Request completed), 500 (System/network error).
- ErrorMessage (string): Detailed error message. Empty string indicates successful deletion (worksheet permanently removed).
Get Sheets
Retrieve sheet list from an Excel workbook using Microsoft Graph API. Requires workbook ID parameter. Returns sheet data array with id, name and position, status code, and error message.
Input Parameters:
- WorkbookId: The unique identifier (drive item ID) of the Excel workbook in OneDrive/SharePoint. Think of it as the 'address' of the file in Microsoft's cloud storage.
Output:
- Sheets (object-array): Array of worksheet objects found in the workbook. Each object contains the following fields: id, name, position, and visibility.
- OriginalStatusCode (number): The original HTTP status code returned by Microsoft Graph API. Default 0 means the request did not reach upstream.
- StatusCode (number): Operation status code: -1=Parameter validation error, 200=Operation completed, 500=System error.
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Clear a Sheet
Clear content from a specified worksheet in an Excel workbook using Microsoft Graph API. Requires workbook ID and sheet name parameters. Optionally accepts range address (defaults to usedRange). Returns success status, status code, and error message.
Input Parameters:
- WorkbookId: The unique identifier (drive item ID) of the Excel workbook in OneDrive/SharePoint. Think of it as the 'address' of the file in Microsoft's cloud storage.
- SheetName: The name of the worksheet to clear. This is the sheet tab name visible at the bottom of the Excel file.
Options:
- Range: Excel range address to clear specific cells (optional). Leave empty or use empty string "" to clear all data in the worksheet (entire used range).
Output:
- Success (bool): Boolean flag indicating whether the clear operation was successful. True = data cleared successfully; False = operation failed.
- OriginalStatusCode (number): The original HTTP status code returned by Microsoft Graph API. Default 0 means the request did not reach upstream.
- StatusCode (number): Operation status code: -1=Parameter validation error, 200=Operation completed, 500=System error.
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Copy Sheet to Workbook
Copy an entire worksheet (including formulas, formatting, and cell styles) from one Excel workbook to another using Microsoft Graph API. Supports renaming the copied sheet and optionally preserving cell formatting. Handles rate limiting, timeouts, and connection errors automatically. NOTE: The source and target workbooks must be different files. For very large sheets (>5000 rows), operation may take longer or fail due to timeout - consider splitting data into multiple sheets. Cell formulas are preserved when IncludeFormatting is set to 'true'. Refer to Microsoft Graph API documentation for WorkbookId and sheet name requirements.
Input Parameters:
- SourceWorkbookId: [Required] The unique identifier (drive item ID) of the source Excel workbook in OneDrive/SharePoint - think of it as the file's 'passport number' in Microsoft's cloud storage.
- SourceSheetName: [Required] Name of the worksheet to copy from the source workbook (case-sensitive).
- TargetWorkbookId: [Required] The unique identifier (drive item ID) of the destination Excel workbook where the sheet will be copied to. ⚠️ Important: Target workbook MUST be different from source workbook.
Options:
- NewSheetName: [Optional] Name for the new sheet in the target workbook. If left empty, will use the source sheet name.
- IncludeFormulas: [Optional] Whether to copy cell formulas and number formatting along with data. Values: true (recommended) or false.
- CopyRange: [Optional] Specify the range of cells to copy from the source sheet. If left empty, copies the entire used range.
Output:
- CopiedSheet (object): Object containing details of the successfully copied sheet. Empty object {} if operation failed.
- OriginalStatusCode (number): The original HTTP status code returned by Microsoft Graph API. Values: 200 (success), 401 (authentication failed), 404 (sheet/workbook not found), 409 (sheet name conflict), 429 (rate limited), 0 (request did not reach upstream).
- StatusCode (number): Operation status code indicating the execution result. Values: -1 (Parameter validation error), 200 (Request completed), 500 (System/network error).
- ErrorMessage (string): Detailed error message. Empty string indicates successful operation.
Update Sheet
Update properties of an Excel worksheet using Microsoft Graph API. Supports updating sheet name and visibility. Requires workbook ID, and sheet name parameters. Returns success status, status code, and error message.
Input Parameters:
- WorkbookId: The unique identifier (drive item ID) of the Excel workbook in OneDrive/SharePoint - think of it as the file's 'passport number' in Microsoft's cloud storage.
- SheetName: The name of the worksheet to update. Important: Sheet names are case-sensitive ('Sheet1' ≠ 'sheet1') and must match an existing sheet in the workbook.
- Data: The data to update in the specified range. Supports JSON Array String (RECOMMENDED) or CSV Text formats.
- RangeAddress: Excel cell range (cell position) where data will be written - think of it as the 'coordinates' in the spreadsheet. This parameter is REQUIRED for Update Sheet operation.
Output:
- OriginalStatusCode (number): The original HTTP status code returned by Microsoft Graph API. Values: 200/201/204 (success), 401 (authentication failed), 404 (worksheet/workbook not found), 409 (range conflict), 429 (rate limited), 400 (invalid request), 0 (request did not reach upstream).
- StatusCode (number): Operation status code indicating the execution result. Values: -1 (Parameter validation error), 200 (Request completed), 500 (System/network error).
- ErrorMessage (string): Detailed error message. Empty string indicates successful operation (data written to specified range).
Create a Table
Create a new table in a specified worksheet using Microsoft Graph API. Requires workbook ID, sheet name, range address, and hasHeaders flag. Returns new table metadata, status code, and error message.
Input Parameters:
- WorkbookId: The unique identifier (drive item ID) of the Excel workbook in OneDrive/SharePoint. Think of it as the 'address' of the file in Microsoft's cloud storage.
- SheetName: The name of the worksheet where the table will be created. Sheet names are case-sensitive. Example: 'Sheet1', 'Sales Data'.
- TableName: The name for the new table. Must be unique within the worksheet and cannot exceed 255 characters. Example: 'SalesTable', 'EmployeeData'
Options:
- RangeAddress: The Excel range address containing the table data (optional). Leave empty to auto-detect the used range.
- HasHeaders: Whether the first row of the table contains headers (column names). Set to true if the first row contains headers; false if the first row contains data. Default is true.
Output:
- NewTable (object): Object containing details of the newly created table. Contains fields like id, name, address, showHeaders, showTotals, style, and columns. Empty object {} if creation failed.
- OriginalStatusCode (number): The original HTTP status code returned by Microsoft Graph API. Default 0 means the request did not reach upstream.
- StatusCode (number): Operation status code: -1=Parameter validation error, 200=Operation completed, 500=System error.
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Delete a Table
Delete a specified table from an Excel workbook using Microsoft Graph API. Requires workbook ID, sheet name, and table name parameters. Returns success status, status code, and error message.
Input Parameters:
- WorkbookId: The unique drive item ID of the Excel workbook containing the table.
- SheetName: The name of the worksheet containing the table. Sheet names are case-sensitive. WARNING: This action will permanently delete the entire table structure.
- TableName: The name or ID of the table to delete. Table names are unique within a worksheet. CRITICAL: This will permanently delete the entire table - all data will be lost and cannot be recovered.
Output:
- Success (bool): Boolean flag indicating whether the table was successfully deleted. True = entire table including structure and all data permanently deleted; False = operation failed.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. 204=table deleted successfully, 400=invalid parameters, 401=authentication failed, 404=table/worksheet not found, 429=rate limited, 500/503=server error, 504=timeout.
- StatusCode (number): Operation status code: 200=Success, -1=Parameter validation error, 500=System error.
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Convert to Range
Convert a table to a normal cell range in an Excel workbook using Microsoft Graph API. Requires workbook ID, sheet name, and table name parameters. Returns success status, status code, and error message.
Input Parameters:
- WorkbookId: The unique identifier (drive item ID) of the Excel workbook containing the table in OneDrive/SharePoint - think of it as the file's 'passport number' in Microsoft's cloud storage.
- SheetName: ⚠️ DESTRUCTIVE OPERATION WARNING: This action permanently converts the table to a regular cell range. All table features will be lost. The name of the worksheet containing the table.
- TableName: The name or ID of the table to convert to a range. Important: Table names are case-sensitive ('Table1' ≠ 'table1') and must be unique within a worksheet.
Output:
- OriginalStatusCode (number): The original HTTP status code returned by Microsoft Graph API. Values: 200/204 (success), 401 (authentication failed), 404 (table/worksheet not found), 429 (rate limited), 400 (invalid request), 0 (request did not reach upstream).
- StatusCode (number): Operation status code indicating the execution result. Values: -1 (Parameter validation error), 200 (Request completed), 500 (System/network error).
- ErrorMessage (string): Detailed error message. Empty string indicates successful operation (table converted to regular range, table features removed but data preserved).
Get Columns
Retrieve column data from a specified table in an Excel workbook using Microsoft Graph API. Requires workbook ID, sheet name, and table name parameters. Returns column data array, status code, and error message.
Input Parameters:
- WorkbookId: The unique identifier (drive item ID) of the Excel workbook in OneDrive/SharePoint - think of it as the file's 'passport number' in Microsoft's cloud storage.
- SheetName: The name of the worksheet containing the table. Important: Sheet names are case-sensitive ('Sheet1' ≠ 'sheet1').
- TableName: The name or ID of the table to retrieve column information from. Important: Table names are unique within a worksheet.
Options:
- Limit: Maximum number of columns to return (optional). Used for pagination. Default is empty (returns all columns).
- Offset: Number of columns to skip from the beginning (optional, default 0). Used for pagination.
Output:
- Columns (object-array): Array of column objects retrieved from the table, with pagination support. Each column object contains: id, name, index, and values (empty in this response).
- OriginalStatusCode (number): The original HTTP status code returned by Microsoft Graph API. Values: 200 (success), 401 (authentication failed), 404 (table/sheet not found), 429 (rate limited), 400 (invalid request), 0 (request did not reach upstream).
- StatusCode (number): Operation status code indicating the execution result. Values: -1 (Parameter validation error), 200 (Request completed), 500 (System/network error).
- ErrorMessage (string): Detailed error message. Empty string indicates successful operation.
Lookup a Column
Lookup detailed information about a specific column in an Excel table using Microsoft Graph API. Requires workbook ID, sheet name, table name, and column name parameters. Returns column data object with id, name, index and values, status code, and error message.
Input Parameters:
- WorkbookId: The unique identifier (drive item ID) of the Excel workbook in OneDrive/SharePoint - think of it as the file's 'passport number' in Microsoft's cloud storage.
- SheetName: The name of the worksheet containing the table. Important: Sheet names are case-sensitive ('Sheet1' ≠ 'sheet1').
- TableName: The name or ID of the table containing the column. Important: Table names are unique within a worksheet.
- ColumnName: The name or ID of the specific column to retrieve. Important: Column names are case-sensitive ('ProductName' ≠ 'productname').
Options:
- IncludeValues: Whether to include column data values in the response (optional, default true). Set to false to retrieve ONLY column metadata without data.
Output:
- Column (object): Object containing detailed information about the looked-up column. Empty object {} if column not found.
- OriginalStatusCode (number): The original HTTP status code returned by Microsoft Graph API. Values: 200 (success), 401 (authentication failed), 404 (column/table/worksheet not found), 429 (rate limited), 400 (invalid request), 0 (request did not reach upstream).
- StatusCode (number): Operation status code indicating the execution result. Values: -1 (Parameter validation error), 200 (Request completed), 500 (System/network error).
- ErrorMessage (string): Detailed error message. Empty string indicates successful operation.
Get Rows
Retrieve row data from a specified table in an Excel workbook using Microsoft Graph API. Requires workbook ID, sheet name, and table name parameters. Returns row data array, status code, and error message.
Input Parameters:
- WorkbookId: The unique identifier (drive item ID) of the Excel workbook containing the table. Think of it as the 'address' of the file in Microsoft's cloud storage.
- SheetName: The name of the worksheet containing the table. This is the sheet tab name visible at the bottom of the Excel file. IMPORTANT: Sheet names are case-sensitive.
- TableName: The name or ID of the table to retrieve rows from. Table names are unique within a worksheet. IMPORTANT: This action retrieves data rows only (excluding the header row).
Options:
- Limit: Maximum number of rows to return (optional). Used for pagination. Default is empty (returns all rows).
- Offset: Number of rows to skip from the beginning (optional, default 0). Used for pagination.
Output:
- Rows (object-array): Array of row objects retrieved from the table (excluding header row). Each row object contains: index and values.
- OriginalStatusCode (number): The original HTTP status code returned by Microsoft Graph API. Default 0 means the request did not reach upstream.
- StatusCode (number): Operation status code: -1=Parameter validation error, 200=Operation completed, 500=System error.
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get Rows from Sheet
Retrieve row data from a specified worksheet in an Excel workbook using Microsoft Graph API. Requires workbook ID, and sheet name parameters. Returns row data array with row numbers and values, status code, and error message.
Input Parameters:
- WorkbookId: The unique identifier (drive item ID) of the Excel workbook in OneDrive/SharePoint. Think of it as the 'address' of the file in Microsoft's cloud storage.
- SheetName: The name of the worksheet within the workbook. This is the sheet tab name visible at the bottom of the Excel file. IMPORTANT: Sheet names are case-sensitive.
Options:
- Limit: Maximum number of rows to return. Range: 1-10000. Default: 1000. If the worksheet contains fewer rows than this limit, all rows will be returned.
- RangeAddress: Excel range address to retrieve specific cell ranges (optional). Leave empty to return the entire used range of the worksheet.
Output:
- Rows (object-array): Array of row objects from the worksheet. Each row object contains: rowNumber and values.
- OriginalStatusCode (number): The original HTTP status code returned by Microsoft Graph API. Default 0 means the request did not reach upstream.
- StatusCode (number): Operation status code: -1=Parameter validation error, 200=Operation completed, 500=System error.
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get Rows from Sheet with Range
Gets the range object specified by the address or name.
Input Parameters:
- WorkbookId: The unique identifier (drive item ID) of the Excel workbook in OneDrive/SharePoint. Think of it as the 'address' of the file in Microsoft's cloud storage.
- SheetName: The name of the worksheet within the workbook. This is the sheet tab name visible at the bottom of the Excel file. Sheet names are case-sensitive.
- RangeName: Excel range address to retrieve specific cells (required for this action).
Output:
- Rows (object-array): Array of row objects from the specified range. Each row object contains: rowNumber and values.
- OriginalStatusCode (number): The original HTTP status code returned by Microsoft Graph API. Default 0 means the request did not reach upstream.
- StatusCode (number): Operation status code: -1=Parameter validation error, 200=Operation completed, 500=System error.
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Append Data to Sheet
Append data to a specified worksheet in an Excel workbook using Microsoft Graph API. Requires workbook ID, sheet name, and data parameters. Supports JSON or CSV format data. Returns success status, status code, and error message.
Input Parameters:
- WorkbookId: The unique drive item ID of the Excel workbook.
- SheetName: The name of the worksheet to append data to. Must match an existing sheet in the workbook (case-sensitive).
- Data: The data to append to the sheet. Supports JSON Array (RECOMMENDED) or CSV Text formats.
Options:
- RangeAddress: OPTIONAL - Excel Cell Range Address: Leave EMPTY (Recommended) to automatically append to the next available row. Specify Range (CAUTION) to write data to a specific location (will overwrite).
Output:
- Success (bool): Boolean flag indicating whether data was successfully written to the worksheet. True = data appended/updated successfully; False = operation failed.
- OriginalStatusCode (number): The original HTTP status code returned by Microsoft Graph API. Default value is 0.
- StatusCode (number): Operation status code: 200 (Success), -1 (Parameter validation error), 500 (System error).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Append Rows to Table
Append rows to a specified table in an Excel workbook using Microsoft Graph API. Requires workbook ID, sheet name, table name, and row data parameters. Supports JSON or CSV format data. Returns success status, status code, and error message.
Input Parameters:
- WorkbookId: The unique drive item ID of the Excel workbook containing the table.
- SheetName: The name of the worksheet containing the table. Sheet names are case-sensitive.
- TableName: The name or ID of the table to append rows to. Table names are unique within a worksheet.
- Data: The row data to append. Supports JSON Array (RECOMMENDED) or CSV Text formats.
Output:
- Success (bool): Boolean flag indicating whether rows were successfully appended to the table. True = all rows added without errors; False = operation failed.
- OriginalStatusCode (number): The original HTTP status code returned by Microsoft Graph API. Default value is 0.
- StatusCode (number): Operation status code: 200 (Success), -1 (Parameter validation error), 500 (System error).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Append or Update Sheet
Append or update row data in a worksheet using Microsoft Graph API. Requires workbook ID, sheet name, data, and range address parameters. Supports JSON or CSV format data. Returns success status, status code, and error message.
Input Parameters:
- WorkbookId: The unique identifier of the Excel file in OneDrive/SharePoint (also called drive item ID).
- SheetName: The name of the worksheet to append/update. Must match an existing sheet in the workbook (case-sensitive).
- Data: The data to append or update. Supports JSON Array (RECOMMENDED) or CSV Text formats.
Options:
- Range: OPTIONAL - Excel Cell Range Address: Default (Empty - RECOMMENDED) enables upsert mode using column A as primary key. Specify Range (CAUTION) to write data to a specific location (will overwrite).
Output:
- Success (bool): Boolean flag indicating whether data was successfully appended/updated. True = operation successful; False = operation failed.
- OriginalStatusCode (number): The original HTTP status code returned by Microsoft Graph API. Default value is 0.
- StatusCode (number): Operation status code: 200 (Success), -1 (Parameter validation error), 500 (System error).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
5. Example Usage
This section will guide you through creating a simple workflow to create a new Excel workbook in your OneDrive.
The workflow will consist of three nodes: Start -> Create a Workbook -> Answer.
1. Add the Tool Node
- In the workflow canvas, click the "+" button to add a new node.
- In the panel that appears, select the "Tools" tab.
- Find and select "Microsoft Excel" from the list of tools.
- In the list of supported operations for Microsoft Excel, click on "Create a Workbook" to add the node to your canvas.
2. Configure the Node
- Click on the newly added "Create a Workbook" node to open its configuration panel on the right.
- Credentials Configuration: At the top of the panel, find the credentials field. Click the dropdown menu and select your pre-configured Microsoft Excel credential.
- Parameter Configuration: Fill in the required input parameters for the action.
- FileName: Enter a name for your new workbook, for example, Monthly_Report.xlsx.
3. Run and Validate
- Once all required parameters are correctly filled, any error indicators on the workflow canvas will disappear.
- Click the "Run" button in the top-right corner of the canvas to execute the workflow.
- After a successful execution, you can click the log icon in the top-right corner to view the detailed input and output of the node, confirming that the operation was successful.
After completing these steps, your workflow is fully configured. When you run it, a new Excel workbook named "Monthly_Report.xlsx" will be created in the root directory of your OneDrive.
6. FAQs
Q: Why am I getting a 401 Unauthorized or 403 Forbidden error?
A: This typically indicates an issue with your credentials or permissions. Please check the following:
- Correct Credentials: Ensure you have selected the correct Microsoft Excel credential in the node configuration.
- API Permissions: Verify that the permissions granted when you configured your credentials in GoInsight are sufficient. You may need permissions like Files.ReadWrite.All or Sites.ReadWrite.All depending on where the files are stored.
- Token Expiration: Your access token may have expired. Try re-authorizing your credential in the GoInsight credentials section.
Q: What is a WorkbookId and how do I find it?
A: The WorkbookId is the unique identifier for an Excel file stored in OneDrive or SharePoint, also known as the drive item ID. The easiest way to find it within a workflow is to use the Get Workbooks operation. This action will return a list of all your Excel files, each with its corresponding id (which is the WorkbookId), name, and webUrl. You can then pass this ID to other nodes.
Q: What format should the Data parameter be in for appending rows?
A: The Data parameter is flexible and accepts a string in one of two formats:
- JSON Array of Arrays: A JSON-formatted string where each inner array represents a row. Example: [[1, "Product A", 10.50], [2, "Product B", 22.00]]
- CSV Format: A string where values are separated by commas and rows are separated by newline characters (\n). Example: "1,Product A,10.50\n2,Product B,22.00"
7. Official Documentation
For more in-depth information about the underlying API used by this node, please refer to the official Microsoft Graph API documentation for Excel:
Leave a Reply.