Use Microsoft Excel in Sim to manage worksheets, table rows, and cell ranges in .xlsx workbooks on OneDrive for Business or SharePoint. Discover worksheets and tables, add or update records, write formulas and number formats, apply formatting, and calculate workbook results.
Choose a Microsoft account with access to the workbook. SharePoint site browsing requires the Sites.Read.All permission; reconnect an existing account to consent to the added scope. Enter a workbook ID and, for SharePoint, its drive ID, or use the selectors.
Use Create Session when several operations work on the same workbook. Turn on Save Changes to persist edits, or leave it off for a temporary copy. Pass the returned sessionId to every operation in that sequence, then close the session. Requests without a session ID save their changes directly. List operations return one page and expose top and skip; increase skip by the page count until fewer than top items are returned. Range reads should use an explicit bounded range for large worksheets; returned cell values retain the existing trimming of trailing empty rows and columns, while formula and format matrices describe the full returned range.
Sim requests these scopes when someone connects a Microsoft Excel account. For a self-hosted deployment, register your own app with the provider using the settings below. See Integrations and OAuth for setup.
Workbook session ID from Create Session. Omit for a sessionless request that saves changes.
spreadsheetId
string
Yes
The ID of the spreadsheet/workbook containing the table (e.g., "01ABC123DEF456")
driveId
string
No
The ID of the drive containing the spreadsheet. Required for SharePoint files. If omitted, uses the signed-in user’s default OneDrive. Excel workbook APIs require a business account.
tableName
string
Yes
The name of the table to add rows to (e.g., "Table1", "SalesTable")
index
number
No
Zero-based insertion index. Omit to append at the end.
values
array
No
Data rows in table column order, without headers (e.g., [["Value", 30]]). Object rows are also accepted in key order for compatibility. Omit to add a blank row.
Workbook session ID from Create Session. Omit for a sessionless request that saves changes.
spreadsheetId
string
Yes
The ID of the Excel workbook to add the worksheet to (e.g., "01ABC123DEF456")
driveId
string
No
The ID of the drive containing the spreadsheet. Required for SharePoint files. If omitted, uses the signed-in user’s default OneDrive. Excel workbook APIs require a business account.
worksheetName
string
No
The name of the new worksheet (e.g., "Sales Q1", "Data"). Omit for an automatic name. Supplied names must be unique within the workbook and cannot exceed 31 characters
Workbook session ID from Create Session. Omit for a sessionless request that saves changes.
spreadsheetId
string
Yes
The ID of the spreadsheet/workbook to read from (e.g., "01ABC123DEF456")
driveId
string
No
The ID of the drive containing the spreadsheet. Required for SharePoint files. If omitted, uses the signed-in user’s default OneDrive. Excel workbook APIs require a business account.
sheetName
string
Yes
The name of the sheet/tab to read from (e.g., "Sheet1", "Sales Data")
cellRange
string
No
The cell range to read (e.g., "A1:D10"). If not specified, reads the entire used range.
A1-style formulas as a two-dimensional array. Null leaves a cell unchanged.
formulasLocal
array
No
A1-style formulas in the user locale as a two-dimensional array. Null leaves a cell unchanged.
formulasR1C1
array
No
R1C1-style formulas as a two-dimensional array. Null leaves a cell unchanged.
numberFormat
array
No
Excel number format codes as a two-dimensional array. Null leaves a cell unchanged.
columnHidden
boolean
No
Hide all columns in the target range.
rowHidden
boolean
No
Hide all rows in the target range.
sessionId
string
No
Workbook session ID from Create Session. Omit for a sessionless request that saves changes.
spreadsheetId
string
Yes
The ID of the spreadsheet/workbook to write to (e.g., "01ABC123DEF456")
driveId
string
No
The ID of the drive containing the spreadsheet. Required for SharePoint files. If omitted, uses the signed-in user’s default OneDrive. Excel workbook APIs require a business account.
sheetName
string
Yes
The name of the sheet/tab to write to (e.g., "Sheet1", "Sales Data")
cellRange
string
No
The cell range to write to (e.g., "A1:D10", "A1"). Defaults to "A1" if not specified.
values
array
No
The data to write as a 2D array (used exactly as provided) or array of objects. For object rows, their keys become a header row. Use a 2D array to write data without added headers.
Workbook session ID from Create Session. Omit for a sessionless request that saves changes.
spreadsheetId
string
Yes
The ID of the spreadsheet/workbook (e.g., "01ABC123DEF456")
driveId
string
No
The ID of the drive containing the spreadsheet. Required for SharePoint files. If omitted, uses the signed-in user’s default OneDrive. Excel workbook APIs require a business account.
sheetName
string
No
The name of the worksheet (e.g., "Sheet1"). If omitted, the range must use the combined "Sheet1!A1:B2" format.
range
string
Yes
The cell range to clear (e.g., "A1:D10" or "Sheet1!A1:D10")
applyTo
string
No
What to clear: "All", "Formats", or "Contents". Defaults to "All".
Workbook session ID from Create Session. Omit for a sessionless request that saves changes.
spreadsheetId
string
Yes
The ID of the spreadsheet/workbook (e.g., "01ABC123DEF456")
driveId
string
No
The ID of the drive containing the spreadsheet. Required for SharePoint files. If omitted, uses the signed-in user’s default OneDrive. Excel workbook APIs require a business account.
sheetName
string
No
The name of the worksheet (e.g., "Sheet1"). If omitted, the range must use the combined "Sheet1!A1:B2" format.
range
string
Yes
The cell range to format (e.g., "A1:D10" or "Sheet1!A1:D10")
fillColor
string
No
Background fill color as an HTML hex code (e.g., "#FFFF00").
fontBold
boolean
No
Whether the font is bold.
fontItalic
boolean
No
Whether the font is italic.
fontColor
string
No
Font color as an HTML hex code (e.g., "#FF0000").
fontSize
number
No
Font size in points (e.g., 12).
fontUnderline
string
No
None, Single, Double, SingleAccountant, or DoubleAccountant.
Workbook session ID from Create Session. Omit for a sessionless request that saves changes.
spreadsheetId
string
Yes
The ID of the spreadsheet/workbook (e.g., "01ABC123DEF456")
driveId
string
No
The ID of the drive containing the spreadsheet. Required for SharePoint files. If omitted, uses the signed-in user’s default OneDrive. Excel workbook APIs require a business account.
address
string
Yes
The range address for the table data source (e.g., "Sheet1!A1:D5"). If no sheet name is included, the active sheet is used.
hasHeaders
boolean
No
Whether the first row of the range contains column headers. Defaults to true.
Workbook session ID from Create Session. Omit for a sessionless request that saves changes.
spreadsheetId
string
Yes
The ID of the spreadsheet/workbook (e.g., "01ABC123DEF456")
driveId
string
No
The ID of the drive containing the spreadsheet. Required for SharePoint files. If omitted, uses the signed-in user’s default OneDrive. Excel workbook APIs require a business account.
worksheetName
string
Yes
The name of the worksheet to delete (e.g., "Sheet1", "Old Data")
Sort conditions [{key, ascending, sortOn, color, dataOption, icon}]. Overrides sortColumn/sortAscending; ascending defaults to true for each condition; key is a zero-based offset, sortOn is Value, CellColor, FontColor, or Icon; dataOption is Normal or TextAsNumber; icon contains set and index.
sortMethod
string
No
Chinese character ordering: PinYin or StrokeCount.
orientation
string
No
Rows (default) or Columns. Applies only to range sorts.
sessionId
string
No
Workbook session ID from Create Session. Omit for a sessionless request that saves changes.
spreadsheetId
string
Yes
The ID of the spreadsheet/workbook (e.g., "01ABC123DEF456")
driveId
string
No
The ID of the drive containing the spreadsheet. Required for SharePoint files. If omitted, uses the signed-in user’s default OneDrive. Excel workbook APIs require a business account.
tableName
string
No
The name of the table to sort. When provided, the table is sorted and range/sheetName are ignored.
sheetName
string
No
The name of the worksheet (e.g., "Sheet1"). Used for range sorts when the range does not include a sheet name.
range
string
No
The cell range to sort (e.g., "A1:D10" or "Sheet1!A1:D10"). Required when no table name is provided.
sortColumn
number
No
Zero-based sort key: column offset for Rows orientation, row offset for Columns orientation.
sortAscending
boolean
No
Whether to sort in ascending order. Defaults to true.
hasHeaders
boolean
No
Whether the range has a header row that should be excluded from sorting. Only applies to range sorts. Defaults to false.
matchCase
boolean
No
Whether casing affects string ordering. Defaults to false.