Using markdown tables
Asked by BlueM:

According to [https://confluence.atlassian.com/bitbucketserver/markdown-syntax-guide-776639995.html#Markdownsyntaxguide-Codeblocks](https://confluence.atlassian.com/bitbucketserver/markdown-syntax-guide-776639995.html#Markdownsyntaxguide-Tables) it should be possible to insert tables via Markdown syntax. The example is exactly this:

```
| Day     | Meal    | Price || --------|---------|-------|| Monday  | pasta   | $6    || Tuesday | chicken | $8    |
```

However, when pasting exactly that code into Confluence (via the "Insert Markup" macro), what I get is definitely not a table, but rather arbitrarily formatted text.

Am I missing something or is that feature "only" broken?


Answers:
author: Tim Franzke
body: Is this being looked at? I am trying to transfer some API docs to confluence and need the tables.

comments: author: dfacastro
body: I'm facing the same issue as well.


author: Tim Haintz
body: Me too.


author: Ditta Khan
body: Same here. I'm on version 6.11.0


author: Nar Kumar C. - Narva Software
body: Hi Tim,

If you are using Confluence Cloud, you can use our app: [**Markdown for Confluence**](https://marketplace.atlassian.com/apps/1231324/markdown-for-confluence-native-markdown-editor?hosting=cloud&tab=overview&utm_source=community&utm_medium=referral&utm_content=578215)

You can open the Markdown editor from the app and simply paste Markdown content, including table data.

The app will do automatic conversion when you save/publish the page and store as native Confluence table.

Hope it helps.

Regards,

Nar


author: Sean Smith
body: Reading the reviews, a couple people noted this app breaks if you try to use images. Is there a timeline for fixing that?


author: Sean Smith
body: Yeah, we really need native support for Markdown in Confluence.


author: Michael Faux
body: Markdown tables still not rendering on Confluence Cloud as of April 3, 2018.


author: Sean Smith
body: Confluence is killing me. There are exactly ZERO intuitive ways to paste columnar data into HTML tables on the cloud version (because HTML macro not available). This is a CORE feature for content writers. How can they be messing this up so bad?

comments: author: Jeff Aguilera
body: Because they mess up so many things, in so many ways. Their code is one big pile of technical debt.


author: surjya24
body: So, my table started working after I made sure there are lines above and below the table, two spaces at the end of each line.

comments: author: marie.leo
body: I can confirm this works for me.

Just make sure there is one empty line above and below where you paste your table and each row has at least 2 spaces at the end.


author: Tejas Shah
body: Confirming this works.


author: Dmytro Benditkis
body: It works in Jira Cloud at least for now 24 Oct 2023

Thank you for sharing!


author: Dmitriy Davydov
body: Thanks, I confirm this works 2024-07-15.

It works even without double space at the end of the line \` \`.

Try:

```
| Day     | Meal    | Price || --------|---------|-------|| Monday  | pasta   | $6    || Tuesday | chicken | $8    |
```


author: Thomas Schlegel
body: Hi Carsten,

you're right. This table markdown is not working. It works (more or less), if you change the markup type to "Confluence Wiki".

Regards,

Thomas

comments: author: BlueM
body: Thanks for your feedback. I noticed that and actually, I'm using that at the moment, but I hoped to be able to use a more familiar format.


author: Charles Smartt
body: Shouldn't this be fixed? I am using confluence and using the Confluence Wiki fixes the table, but the rest of the markdown does not work.


author: Ivan Karajas
body: Just ran into this issue as well. Changing the markup type to Confluence Wiki does work, more or less, but then it will break any other Markdown that you're trying to add at the same time. One fewer hoop to jump through would be great!


author: david Chevreau
body: Writing all my docs in _markdown_, i wanted to import it in Confluence without working with confluence. And i dicovered \[pandoc\](<https://pandoc.org>) !

You can use \[pandoc\](<https://pandoc.org>) to convert your .md files to jira files (\`-t jira\` option) which is the atlassian wiki format. Then you copy/paste the resulting text in the \~\~bloc code\~\~ macro.

That's my workflow to work with markdown.

comments: author: Sean Smith
body: Super cool! Thank you so much!!!


author: david Chevreau
body: you're welcome.

i've just made a \~little mistake\~. It's not \*\*\*bloc code\*\*\* but \*\*\*markup\*\*\*(_balise_ in french) macro with "wiki confluence" selected.


author: eric_rovellilambart
body: Great idea David, but unfortunately it can't convert MD tables to anything Atlassian can understand.

Among other things that Atlassian doesn't understand: Their users.


author: Robert Graf
body: [@eric_rovellilambart](/t5/user/viewprofilepage/user-id/5440982)

When I try this example

[Markdown syntax guide \| Bitbucket Data Center 8.18 \| Atlassian Documentation](https://confluence.atlassian.com/bitbucketserver/markdown-syntax-guide-776639995.html#Markdownsyntaxguide-Tables)

    | Day     | Meal    | Price || --------|---------|-------|| Monday  | pasta   | $6    || Tuesday | chicken | $8    |

1. On a Confluence page select "Insert Markup" (not Confluence wiki)

2. Copy \& paste the table (4 lines) above into the left window

3. The preview on the right shows formatted text (bold) but no table lines

4. Press INSERT button and the edit page also only shows formatted text without table lines.

5. Now press the 3 dots bottom right and select "Preview" and the table will be show completely formatted as it should be. Also when you press Publish.

Used Confluence 7.19.17

Also the missing first hyphen in the second line in the Atlassian example isn't an issue. Also if you fix this (use hyphen instead of the space) it works.

Do you have an example of a table which doesn't work?

btw. I also use pandoc. The latest version still has a bug and the first backslash in a link will be converted into "\&bsol;". You can insert this in Jira but in Confluence the link breaks.  

Currently I fix this with this command in my CMD file:

```
setlocal
set file=%cd%\%1
pandoc "%file%.md" -f markdown-smart -t jira -o "%file%.jira"
set par="((Get-Content -path '%file%.md' -Raw) -replace '&bsol;','\') | Set-Content -Path '%file%.jira'"
Powershell -Command %par%
endlocal
```

However, to keep editing easier and better convertable and maybe better readable I don't use tables in my Markdown documentation. Only the simple things.


author: eric_rovellilambart
body: Robert, Thanks for taking the time to explain all that. I worked around Atlassian's problems by copying an "old editor" page and then pasting in the markdown, as suggested elsewhere. And I guess I'll just continue to "enjoy" using the old editor until Atlassian's new editor becomes more useful.


author: Reza
body: It's such a shame that even after two years Confluence team has not even looked at this thread. Markdown is probably the most poular documentation syntax that developers use every day and it is probably the most supported across technologies. Almost every IDE that I know supports it either out of the box or through an extension. Githup and many other online tools support it. But, we don't even get a basic support in Confluence. It's very easy to do guys! just look at how many libraries are out there!


author: Sean Smith
body: OK. To anyone evaluating Confluence for mass content creation:

Atlassian has gotten too far over it's skis. There may be a future where they comment on important features customers are asking. There is hope in that they abandoned HipChat. Hopefully some of the staff that doesn't leave can be repurposed for customer interaction on requested features, including at least the communication of a roadmap within a one year timeline of important issues being raised.

Until you see a regular cadence of communication in this community, please including a low community strength score during your product evaluations.

Sean


author: Nar Kumar C. - Narva Software
body: Hi everyone,

This is an old question which does not have solution.

If you are using Confluence Cloud, you can use our app: [**Markdown for Confluence**](https://marketplace.atlassian.com/apps/1231324/markdown-for-confluence-native-markdown-editor?hosting=cloud&tab=overview&utm_source=community&utm_medium=referral&utm_content=578215)

You can open the Markdown editor from the app and simply paste Markdown content, including table data.

The app will do automatic conversion when you save/publish the page and store as native Confluence table.

Hope it helps.

comments: author: Ditta Khan
body: Thanks Nar. Will there be an add-on for the server version of confluence?


author: Paul Munsey
body: I wanted a table in a README.md file in Bitbucket and ended up with a mess (no formatting, just 1 long line of all the table syntax).

I found: [MarkdownDemo](https://bitbucket.org/tutorials/markdowndemo)

I thought that helped, but now I'm not so sure; not that the page isn't useful, but it didn't indicate what was needed to fix the table display.

What did work was once I put a blank line before the table definition.

comments: author: Sean Smith
body: I too found the blank line to be key.

Here is my flow:

Go to [Markdown Tables Generator](https://www.tablesgenerator.com/markdown_tables), a great site for producing tables in markdown. From File menu choose "Paste table data...". Paste your CSV or tabular data. Scroll a bit and click "Copy to clipboard". Back in Confluence, launch the Markdown macro and \*make sure\* it says Confluence Wiki (don't ask). Paste the table.


author: Tim Black
body: [@Paul Munsey](/t5/user/viewprofilepage/user-id/1038799) suggestion of putting a blank line immediately before the table definition markdown appears to be a requirement. I'm not using Confluence, but BitBucket Server.

Thanks [@Paul Munsey](/t5/user/viewprofilepage/user-id/1038799) I would not have figured that out for a while - so counterintuitive - and how careless that the documentation doesn't state this huge rake they left there for users to step on..


author: samuelaz
body: This is impacting my work as well. C'mon Atlassian


author: Yonghee Kim
body: Please add markdown table support


author: David Chwalisz
body: I just tried it today in Confluence 1000.0.0-bb4822b3c2b. Pasting once for Markdown and re-pasting each table as Wiki works but is a real pain. Bad enough you cannot use just plain Markdown for native editing.

comments: author: Alessio Gaeta
body: Yeah, plain text editing without the auto-formatting "feature" is a must. And that's true for Jira too. C'mon, let us developers code instead of fighting with text formatting...


author: axi92
body: Same in Bitbucket Server, and the docu is wrong: <https://confluence.atlassian.com/bitbucketserver/markdown-syntax-guide-776639995.html#Markdownsyntaxguide-Tables>


author: mike
body: It would be nice if this could actually be fixed. Importing markdown into Confluence just looks like text soup with lots of tables.


author: Robert Graf
body: Bump again.  
Please add markdown table support.


author: Ives Schneider
body: Bump again.  
Please add markdown table support.


author: TLC
body: Bump. Same issue, markdown tables are a big deal. Please fix this!


author: Michael Tuchman
body: What really upsets me about this is that pasting have the exact same user outcome as typing. If I can type a table, I should be able to paste a table, Preferably with just a CTRL-V and without opening additional windows.

I know you're aware of markup, since your system is built in it. So, why is it \*SO FRICTIONAL\* to get a table in markdown format from my clipboard to a confluence page?

The below should already be seen as a nicely formatted table. It's not.

\| \| mpg\| cyl\| disp\|  
\|:-----------------\|----:\|---:\|----:\|  
\|Mazda RX4 \| 21.0\| 6\| 160\|  
\|Mazda RX4 Wag \| 21.0\| 6\| 160\|  
\|Datsun 710 \| 22.8\| 4\| 108\|  
\|Hornet 4 Drive \| 21.4\| 6\| 258\|  
\|Hornet Sportabout \| 18.7\| 8\| 360\|  
\|Valiant \| 18.1\| 6\| 225\|


author: Michael Tuchman
body: Atlassian, are you listening? Are you getting the sense that your community needs you to get on this STAT?


author: Daniel Marshall
body: You can create a 1x1 table and paste from Exel. Not ideal, but it beats retyping things.

comments: author: Michael Tuchman
body: Not even remotely acceptable, primarily because such an obvious feature (ability to paste in markdown) was not even considered.


author: Daniel Marshall
body: Yes I agree, it's ridiculous that it's not a feature especially given Atlassian's focus on developers and their frequent need for displaying tables in documentation.

I'm just providing a workaround if somebody comes looking for an answer.


author: Kev
body: Trying to work with the Confluence Wiki markup, the formatting of background colours seems to be all over the shop. When setting the colour, it will take UNLESS you actually put text into the "Cell". As soon as you put a header or text in there, the background colour reverts to default.  

Apologies for hijacking the thread, but I'm getting completely exasperated at trying to find a comprehensive example of formatting backgrounds/cell colours using markup language rather than having to manually edit it!  

I have an excel spreadsheet (no booing at the back there! :) which has one cell into which I've carefully crafted the markup required to insert a table-plus table and info boxes in the appropriate cells. However, a simple thing like trying to make a cell change colour seems to be eluding me, I've read so many web pages on what to do, but the majority of these all point to having to manually edit the cells once the table has been inserted.  

Is there any chance of someone here giving me an "aha!" moment......pleeeeeease!!


author: Anirban's Space
body: Was able to use html \<table\> tags to work with tables in confluence markdown page


author: Nam H?i (MiraiHanabi)
body: \*\*It's still not working!!!\*\*


Tags: import

markdown

markup