Skip to main content

Copy range

Copy a cell or range to another place in the same workbook, as values or with formulas, and optionally with number formats.

Command in the Microsoft 365 toolkit · id ooa.microsoft365/excel_copy_range · 10 inputs (2 required), 1 output

Inputs​

InputTypeRequiredDefaultWhat it is
Access tokenCredentialNoMicrosoft Graph access token from the vault; or leave it empty and choose a connection that signs in, which gets and renews the token.
Remote pathStringNoWorkbook path in the drive (e.g. Finance/budget.xlsx), or id:{item-id}.
SheetStringNoWorksheet the range is on.
RangeStringYesCell or range to copy.
DestinationStringYesTop-left cell to copy to.
Destination sheetStringNoWorksheet to copy to; the same sheet when empty.
CopyStringNovaluesvalues copies the results; formulas copies formulas exactly as written (cell references are not moved).
Include number formatsBooleanNotrueAlso copy number formats such as dates and currency.
DriveStringNome/driveWhose files: me/drive (your OneDrive), a person (ann@acme.com), a SharePoint site (contoso.sharepoint.com:/sites/Finance), a library of a site by name (contoso.sharepoint.com:/sites/Finance:/Invoices), or sites/{site-id}/drive or drives/{drive-id}. With an app sign-in, name a person or site.
Endpoint addressStringNohttps://graph.microsoft.com/v1.0Graph endpoint; change only for national clouds or testing.

Outputs​

OutputTypeWhat it is
addressStringThe range that was written, e.g. H2:K10.