0

I was trying to copy data to clipboard as part of custom tab ribbon commands in Excel using copy-to-clipboard(https://github.com/sudodoki/copy-to-clipboard). This npm package internally using document.execCommand(‘copy’) commands to copy data to clipboard. I tried this in chrome dev console and command is working. This was working in Excel Desktop but its failing in Excel Web. I tried few other alternatives to copy data but they are failing in web. Is this a known limitation or can someone help me how you can copy data to clipboard in Excel web commands ?

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45

1 Answers1

0

Correct. OfficeJS doesn't provide anything for that. You may sill use the Document.execCommand() API which includes "copy", "cut" and "paste". But it was deprecated and may not work in the web browsers any longer.

Feature requests on Tech Community are considered, when the dev team go through the planning process. Use the github label: Type: product feature request at https://aka.ms/M365dev-suggestions .

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45