Pasting Excel tables into WordPress

If you have a site that posts a lot of data and you get a lot of that data in Excel spreadsheets and you use self-hosted WordPress, and you were on certain versions of Excel you might have experienced some problems since WordPress upgraded to version 3.9 last April. For some of you, those problems likely persisted even through WordPress 4.0 that was released today.

So what do you do if out of concerns for security you don’t want to stay on an older version of WordPress like 3.8.4 but also don’t want to give up the ability to post Excel tables (and also don’t feel like arguing with WordPress zealots who’d mock you for wanting to use Excel)?

I didn’t really come across anything in my web searching that didn’t require editing some core files. That approach works but it’s a pain because you’d have to make those changes every time WordPress is updated.

The trick is simply to remove the “paste” plugin in the TinyMCE editor. There’s a plugin for that!

go to WordPress plugin menu and select “Add New”

search for the plugin “Advanced TinyMCE Configuration” by Andrew Ozz

Install and activate the plugin

In the WordPress settings menu select “TinyMCE Config”

Click on the button that says “Show the default TinyMCE settings”

Search on the page for “paste” or scroll down to the “plugins” option and click the “change” (see below)

8. Delete “paste” from the list (you need to remove the comma too, already removed in the example below)

9. Click “Save Changes”

That’s all there is to it. You should be able to once again easily paste tables from Excel directly into WordPress’s visual editor with correct formatting.
Example:

Program

Net

Date

Viewers (000)

MLB WED NIGHT – EARLY L

ESPN

BOSTON/NEW YORK YANKEES

09/03/14

1019

TENNIS: US OPEN AFT L

ESPN

MENS/WOMENS QTRFINALS

09/03/14

711

SPORTSCENTER EARLY L

ESPN

09/03/14

603

MLB WED NIGHT – LATE L

ESPN

ARIZONA/SAN DIEGO

09/03/14

485

SPORTSCENTER MORNING

ESPN

09/03/14

467

SPORTSCENTER MORNING L

ESPN

09/03/14

444

SPORTSCENTER MORNING

ESPN

09/03/14

443

SPORTSCENTER AM L

ESPN

09/03/14

405

SPORTSCENTER MORNING

ESPN

09/03/14

378

SPORTSCENTER 1AM L

ESPN

09/03/14

373

SPORTSCENTER AM L

ESPN

09/03/14

372

SPORTSCENTER AM L

ESPN

09/03/14

341

TENNIS: US OPEN PRIME L

ESPN2

MENS/WOMENS QTRFINALS

09/03/14

1393

TENNIS: US OPEN AFT L

ESPN2

MENS & WMNS QTR FINALS

09/03/14

1030

PARDON THE INTERRUPTION

ESPN2

09/03/14

756

FIBA WORLD BASKETBALL L

ESPN2

USA/DOMINICAN REPUBLIC

09/03/14

594

NBA POST GAME L

ESPN2

09/03/14

575

FIRST TAKE L

ESPN2

09/03/14

455

NFL INSIDERS L

ESPN2

09/03/14

429

SPORTSCENTER AM L

ESPN2

09/03/14

372

SPORTSCENTER AM L

ESPN2

09/03/14

341

COLLEGE FOOTBALL LIVE L

ESPN2

09/03/14

291

SPORTSCENTER AM L

ESPN2

09/03/14

290

MIKE & MIKE IN THE MORN L

ESPN2

09/03/14

251

BASEBALL TONIGHT L

ESPN2

09/03/14

182

ESPN FC

ESPN2

09/03/14

84

Bonus: if you use Excel’s ‘format as table’ options, you can paste that right into the visual editor without having to jump through any hoops:

Program

Network

Date

Viewers (000)

MLB WED NIGHT – EARLY L

ESPN

BOSTON/NEW YORK YANKEES

09/03/14

1019

TENNIS: US OPEN AFT L

ESPN

MENS/WOMENS QTRFINALS

09/03/14

711

SPORTSCENTER EARLY L

ESPN

09/03/14

603

MLB WED NIGHT – LATE L

ESPN

ARIZONA/SAN DIEGO

09/03/14

485

SPORTSCENTER MORNING

ESPN

09/03/14

467

SPORTSCENTER MORNING L

ESPN

09/03/14

444

SPORTSCENTER MORNING

ESPN

09/03/14

443

SPORTSCENTER AM L

ESPN

09/03/14

405

SPORTSCENTER MORNING

ESPN

09/03/14

378

SPORTSCENTER 1AM L

ESPN

09/03/14

373

SPORTSCENTER AM L

ESPN

09/03/14

372

SPORTSCENTER AM L

ESPN

09/03/14

341

TENNIS: US OPEN PRIME L

ESPN2

MENS/WOMENS QTRFINALS

09/03/14

1393

TENNIS: US OPEN AFT L

ESPN2

MENS & WMNS QTR FINALS

09/03/14

1030

PARDON THE INTERRUPTION

ESPN2

09/03/14

756

FIBA WORLD BASKETBALL L

ESPN2

USA/DOMINICAN REPUBLIC

09/03/14

594

NBA POST GAME L

ESPN2

09/03/14

575

FIRST TAKE L

ESPN2

09/03/14

455

NFL INSIDERS L

ESPN2

09/03/14

429

SPORTSCENTER AM L

ESPN2

09/03/14

372

SPORTSCENTER AM L

ESPN2

09/03/14

341

COLLEGE FOOTBALL LIVE L

ESPN2

09/03/14

291

SPORTSCENTER AM L

ESPN2

09/03/14

290

MIKE & MIKE IN THE MORN L

ESPN2

09/03/14

251

BASEBALL TONIGHT L

ESPN2

09/03/14

182

ESPN FC

ESPN2

09/03/14

84

Note: not on this site, but on the site it really mattered for, after the change I noticed that frequently tables would be pasted in with widths wider than the site’s theme would allow but it was very easy to resize them (narrow the width) within the visual editor after removing the “paste” plugin from TinyMCE as described above.