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.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
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:
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.
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.
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.
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
Copy the contents to Google Sheets and then paste into Gmail.
Copy the contents to Word and then paste to Gmail.
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.
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.
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?