1

I made a chrome extension that takes a screenshot of a part of a website and converts it into an image but I when I right click and copy I can't paste it into an excel cell.

I thought of uploading the image to a server and copying it (because when the image file actually exists, it copies fine) from there but for this project I can't use a server. What can I do? Thanks in advance.

nick
  • 2,819
  • 5
  • 33
  • 69
  • Clipboard usage tends to behave differently depending on your OS environment. What is your environment, and what specifically are you copying? – Andrew Fan Aug 30 '18 at 21:12
  • if you use the canvas object, you can load your screenshot to it, and then export it as base64 https://stackoverflow.com/questions/15685698/getting-binary-base64-data-from-html5-canvas-readasbinarystring – Dani Aug 30 '18 at 21:25
  • @AndrewFan I'm copying an image, a "screenshot" which source is a base64 string. I'm using Windows 7, and Excel 2010... – nick Aug 31 '18 at 15:01
  • @dprogramz the problem isn't that, the problem is that Excel won't accept an image as base64 (when you paste it), but it will accept an actual image file... – nick Aug 31 '18 at 15:02

0 Answers0