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