2

I am aware Google Sheets has a built-in drawing tool but it doesnt quite fit the bill. I've seen several other posting related to HTML5 calling some canvas function like this one:

Draw on HTML5 Canvas using a mouse

But I am not sure that applies either because I imagine that would just some sort of side panel to scribble on but you can't do anything with the drawing. I'd like to be able to load the canvas by clicking on a form or button and then whatever is drawn can be saved or loaded in a cell or table. The built-in drawing app doesnt let you really control the size of your canvas and it takes too many steps to get it done. This possible?

Rubén
  • 34,714
  • 9
  • 70
  • 166
WAV
  • 23
  • 2
  • 1
    Yes, this is possible. See [this guide on making a custom sidebar](https://developers.google.com/apps-script/guides/dialogs), and [insertImage()](https://developers.google.com/apps-script/reference/spreadsheet/sheet#insertImage(BlobSource,Integer,Integer)) in the GAS documentation. – sinaraheneba May 24 '19 at 04:49
  • It looks like insertImage() is just for uploading a file. I would a sort of canvas to draw on. Also, I would prefer to work within the spreadsheet itself, no sidebar. – WAV May 24 '19 at 15:21
  • 2
    Yes, you would need to create a blob from your canvas in order to save it on the sheet. As far as I'm aware, there is no way to display arbitrary HTML within cells; you may need to create a chrome extension to support this if you don't want to use another window or sidebar. – sinaraheneba May 24 '19 at 15:59
  • Thats kind of what I am doing now for exporting/sending emails through GSheets. Someone helped me created a script that loads a menu onOpen similar to the add-ons menu and when selected it prompts for an email address and send option. Looking to accomplish the same thing but with a canvas UI that can be saved or loaded somewhere in the spreadsheet. – WAV May 24 '19 at 17:33
  • Hello @WAV! Have you solved this one? I'm looking for this, as well and I can't find much. Cheers – onit May 24 '20 at 23:52

0 Answers0