RSS

Making SharePoint tables look pretty

This post shows how to use colored and merged table cells in SharePoint Online tables, and how to enable this for WikiTraccs.

You cannot create tables in SharePoint Online that have colored or merged cells.

(The blog post could end here.)

But this is not entirely true. What is true is that, when creating a new SharePoint page, there are no tools that you could click in the text web part’s tool bar. There is no “merge cells” button and no color picker for cell backgrounds.

Nevertheless, it is possible to copy a table from Microsoft Word and paste it to a SharePoint page. Now, if that is officially supported (and I don’t know if it is), WikiTraccs could use the underlying mechanism as well.

This is why WikiTraccs introduces the Use non-standard table transformation setting, and we’ll look at why it’s named like that further down.

Copying tables from Word to SharePoint preserves styles

Take this table for example, created in Word Online:

This table can be copied to the clipboard:

And from the clipboard, the table can now be pasted into a SharePoint page, preserving its style:

Apparently copying and pasting a table from Word carries over cell colors and merged cells. And even more important: those styles stay in place when editing and saving the SharePoint page.

I had multiple clients reach out to me asking for this to be added to WikiTraccs.

WikiTraccs adds support for cell colors and merged cells

Note: this is available as of WikiTraccs v1.22.5.

WikiTraccs can now transform Confluence tables such that cell colors and merged cells are preserved.

This feature is opt-in, you have to activate it in the WikiTraccs settings.

Here’s how to activate the feature:

  1. in the blue WikiTraccs.GUI window, click Settings in the menu bar to open the Settings dialog
  2. in the Settings dialog, in the Migration tab, check the option Use non-standard table transformation

Is this supported by Microsoft?

I don’t know if those copied-over tables are officially supported, as end users can not create them in the text web part editor. Copy and pasting seems to be the only way.

At the same time, I heard from clients that they use this functionality and also that this seemed to be advertised by Microsoft as a feature some time ago.

Why am I cautious?

I’m cautious because page content that cannot be created in the browser editor, by the user, by clicking buttons, might cease to work with a future update (by Microsoft) of the text web part. This might also affect how pages behave when being edited; styles might change or content even disappear.

Will that be the case in the future? I don’t know. I hope not.

Is there a way out if something happens in the future? There certainly is, by modifying page contents via PowerShell.

As long as there is this uncertainty, the setting is placed in the Gray Settings area of the Settings dialog, and it carries the non-standard hint in its name.

Visual comparison

Here’s a colorful Confluence table that already appeared in a blog post:

Table in Confluence

Here’s how that looks in SharePoint with the new setting enabled:

Table in SharePoint, now with colored cells

And here’s how the table would normally look, with the new setting disabled:

Table in SharePoint, new setting disabled

Another Confluence table that uses merged cells:

Table in Confluence

Here’s how that looks in SharePoint with the new setting enabled:

Table in SharePoint, now with merged cells

Here’s how the table would normally look, with the new setting disabled:

Table in SharePoint, new setting disabled

Note that in above image the presence and the direction of cell merging is hinted at by arrows.

Overall, real merged cells are a lot more pleasant to look at.

Wrap

In this blog post we looked at a way to create tables with colored and merged cells in SharePoint Online modern pages, by copying and pasting styled tables from Word.

We also looked at a new WikiTraccs setting that can leverages this behavior.

There is no documentation by Microsoft (that I know of) that describes this as an official feature and words of caution have been written.

If somebody can find official documentation by Microsoft that this is an actual feature that is officially supported, please let me know.