How to keep formatting when paste /import contents from excel/word in confluence page?
Asked by Usman Jawaid:

Hi community,

This is my first question and I am newbie in Confluence.  
I pushed my manager to implement confluence for team collaboration and I proved that it works for the team. But one of my team member ask me question how he can paste table from Excel to Confluence page and keep the source formatting? for this question i didn't have answer and then did some googling and found that either I can import word document or copy source table from Excel and paste in confluence page - but none of them keep the source formatting.

Can someone help me here pls.

Thanks in advance.


Answers:
author: souhaibtouati
body: Maybe this is old thread, but I faced the issue today and found a decent solution for it, so let's share it with the community:

1. Copy the formatted table from Excel

2. Paste it word (you can skip this if your excel contains only this table)

3. Save the word (or excel) file as HTML format

4. open the HTML file and view the page source in your browser

5. copy the full source HTML

6. In confluence create a Markup macro and set it to Markdown (not confluence wiki)

5. Paste the HTML source into your markdown

**Voila ?**

*Note: Editing the table in confluence might be a bit tricky afterwards, but it should work.*

comments: author: Chuka
body: [@souhaibtouati](/t5/user/viewprofilepage/user-id/3749414) you're a life changer, appreciate the workaround!


author: Shannon S
body: Usman,

What kind of formatting are you trying to preserve?

In Confluence, if you want the data you paste from an Excel table to still be in a table, you have to prepare the table first in Confluence.

Thus:

1. You have a 5 column, 5 row Excel spreadsheet.
2. Create a table in Confluence that has 5 rows, 5 columns.
3. Select the content you require in Excel and copy it.
4. Select the top row in Confluence table.
5. Paste.

This will retain all cells in their original columns and rows.

As for having this happen automatically, there is a quite long-standing feature request for this. Despite its age, I would still recommend that you vote on it and comment with your usage case:

* [CONFSERVER-7118](https://jira.atlassian.com/browse/CONFSERVER-7118)

Let me know if you have any questions.

Regards,

Shannon

comments: author: Usman Jawaid
body: Hi Shannon,

Thanks for for answering my question basically I want to preserve cell colors from my Excel spread sheet.As there are so many cells with so many different colors in my Excel spreadsheet and if I create table in Confluence from start then it won't be time efficient as I have to migrate 100+ excel spreadsheets from Excel to Confluence.


author: Shannon S
body: Hi Usman,

In that case, the above feature request would indeed cover it.

I'm not aware of any current add-ons that could help with this, but you can start here:

* [Excel Add-ons for Confluence](https://marketplace.atlassian.com/search?product=confluence&query=excel)

In addition, I've added your question to the Marketplace collection in case any vendors have suggestions for you.

Regards,  
Shannon


author: Usman Jawaid
body: Thanks Shannon I tried your technique works good but cell colors are not preserved.  
again thanks for raising it in marketplace collection.can you please share link.cheers


author: Shannon S
body: Hi Usman,

That is correct, colors won't be maintained in this way. Note that Confluence only supports a handful of colors for cells as well, so you may not be able to use the same colors you have in Excel.

The question is now in BOTH the Confluence and the Marketplace collection, so the link is the same.

Shannon


author: Usman Jawaid
body: Thanks Shannon.


author: Chaitra Pc
body: [@Usman Jawaid](/t5/user/viewprofilepage/user-id/1185855) , try using Internet Explorer and pasting the contents.

If it does not paste the cells with colors in the first go, Undo (Ctrl+z) and paste.

I had a similar requirement, IE worked like a charm.


author: Jake Roztocil
body: I've had some decent success with saving a sheet selection using the "Save As Web Page" option as an htm file, stripping out (or commenting) any html, head, body, and meta tags, and the pasting the result into a HTML Macro.

This preserved any formatting that I've tried except for fill patterns and over-strikes which could be manually added to the css in the style tag.


Tags: atlassian-marketplace