How can I create a table in a Gmail message? I've currently got the data in a Google Docs spreadsheet, but copying and pasting that into the Gmail editor just pastes tab-delimited columns, not a table. I've tried it in both the plain text and rich text editors.
A few years later now, and Google Inbox will let you paste a table directly from Google Sheets or LibreOffice. I assume it also works from Microsoft Office.
This Digital Inspiration blog post helped me out. Basically, you can copy content from any web page and paste it into the Gmail rich text editor. The editor will do its best to keep the formatting.
In my case, that meant that I had to do the following:
- Publish the spreadsheet to the web, but just publish the sheet with the data I wanted to copy;
- Get the link for the published sheet. If you don't want the whole sheet, you can specify the cells you want using the standard
- Open a new tab and paste the link;
- Select the whole table by typing Ctrl + A, and then copy it by typing Ctrl + C. I found that the pasting didn't work at all unless I copied the whole table;
- Go back to Gmail, make sure you're in the rich text editor, and make sure there are blank lines above and below your cursor;
- Type Ctrl + V to paste in the table.
I've found that Google made this thing called Web Clipboard to handle issues like this.
In the Google Drive spreadsheet you're working with, go to Edit → Web Clipboard → Copy Cell Range. Then open a Google Drive document and go to Edit → Web Clipboard and select the cell range you just copied to paste it.
Then do a normal copy and paste from this Google doc to Gmail. Not really pretty, but doesn't require doing anything outside your browser. It would be nice if Google integrated the Web Clipboard into Gmail.
The “File > Publish to Web” part was simple enough. But I got caught when trying to specify certain rows and columns. All of my searching generated no straight forward answer, so here is mine.
Select all the cells you want to appear in your embedded spreadsheet.
Right click somewhere on the selected area and choose “Name and protect range,” or go to “Data > Named and Protected Ranges.”
This will bring the “Name and protected ranges” toolbox on the right side of your spreadsheet. Name your range (text only). I called mine “rangexyz.” A fine, fine name for a spreadsheet range.
Now, when you go to “File > Publish to Web,” put the name of your range in the one-line field above the “Copy and paste the link above” box that displays the code for embedding or linking. To get this field to be editable, you will need to select the specific sheet you are trying to publish. If you leave it as the entire spreadsheet, it won’t be an option.
That will you give you embed code that now has a “range” value in it.
Please tell me that made sense. Also, I don’t normally put huge pictures of software command menus on my Web site. Lovely.
Install this add-in from Google Web Store into Google Chrome:
Here you go. Just run this macro (I wrote this and put it in my quick access menu):
Sub CopyTableForGmail() Dim objWord As Object Selection.Copy Set objWord = CreateObject("Word.Application") objWord.Visible = False objWord.Documents.Add objWord.Selection.PasteExcelTable False, False, False objWord.ActiveDocument.Tables(1).Select objWord.Selection.Copy objWord.ActiveDocument.Saved = 1 objWord.Quit Set objWord = Nothing End Sub
The just go to gmail and paste.
Here's an extension that adds this feature to Gmail: https://mixmax.com/blog/support-for-tables-in-gmail. No coding required.