Usage
sp_workbook_session_create(x, ..., persist_changes = TRUE)
sp_workbook_session_close(x, session_id, ...)Arguments
- x
A SharePoint or OneDrive Excel workbook. Can be a
ms_drive_itemobject, a SharePoint URL, or a path passed toget_sp_item().- ...
Additional parameters passed to
get_sp_item()ifxis not ams_drive_itemobject.- persist_changes
If
TRUE(default), changes made in the session are saved to the workbook.- session_id
A workbook session ID from
sp_workbook_session_create().
Value
sp_workbook_session_create() returns a session ID.
sp_workbook_session_close() returns x invisibly.
Details
Use a session to make several requests to a workbook. Requests without a
session are sent in a new temporary session by the API. If
persist_changes = FALSE, changes made in the session are discarded when it
is closed. A session that isn't closed expires after a few minutes.
Requests in the same session see each other's changes immediately. Requests sent without a session may not (see "Reading after writing" in sp_workbook).
See also
Other workbooks:
local_sp_workbook_session(),
sp_workbook