20

How do I copy & paste tables from an Excel spreadsheet into Gmail and maintain the original formatting and borders?

I'm using Gmail in Chrome.

20

Copying an Excel range results in css styled HTML when pasted into an email client. If you paste into Outlook, depending upon your settings, Outlook will handle the css styled HTML (and might even refactor it within the email).

But gmail won't honor css-styles that are defined in style-sheets or style tags, so the formatting is lost. gmail will honour most css if it is defined inline. i.e. the css for each element is defined in each element's HTML style attribute. You'd have to transform the Excel-range into inline-styled HTML, and get it onto the clipboard in order to succeed.

You have a few options:

  1. Copy from Excel, then Paste into Word, then Copy from Word and Paste into gmail. Your mileage may vary according to the complexity of the formatting, and the version of Excel/Word.

  2. Copy as a picture from Excel, and paste into gmail. You'll lose the textual content, but you should get a bitmap quality image of the source.

  3. Write some VBA to loop over the cells of the source range, and build up some inline-css HTML to make the table, and then put that string onto the clipboard. Warning - this will be quite involved, and even if you get things looking the way you like in gmail, the emails might not render properly in the recipient's email client/program.

  4. EDIT - You might also get acceptable results by copying from Excel, and pasting into Google Sheets, and then copying from Sheets into gmail.

You thought Browser standards were bad. Welcome to the world of Responsive Email Design.

Also, see CampaignMonitor for a good reference of email-client support for css

5

Option 1:

Copy the contents to Google Sheets and then paste into Gmail.

Option 2:

Copy the contents to Word and then paste to Gmail.

1

I found an easy solution. I signed into gmail using Outlook destkop as the client. Then I use Outlook to paste in the Pivot Table and send the email, the formatting is preserved. It even looks the same when I check on it in the Gmail web portal.

0

When copying from Excel to Microsoft Word, and then into gmail, make sure "plain text mode" is NOT selected. You can find it on the upside down triangle next to the delete icon on the lower right hand corner.

  • 1
    The site's Q&A format reserves answers for solutions to the question. This post is really a comment rather than an answer. You can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. Non-answers tend to attract downvotes and are subject to deletion. – fixer1234 Mar 24 '18 at 5:49

protected by Community Mar 24 '18 at 7:18

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.