How do I paste data into a table using Confluence 5.7?
Asked Answered
N

5

21

I have a pile of tabular data I need to paste onto a Confluence web page. The usual mechanisms are NOT working properly for me.

What "usual mechanisms?"

  1. Copy the data to Excel then copy / paste into Confluence.

  2. Format the content using wiki markup, meaning:

    • double bars before / between / after the column header cells
    • single bars before / between / after the data cells

and paste that into the Wiki page.

The first option gets me a table, but it doesn't show the grid lines, and the sorting doesn't work.

The second option plops the markup into the page, but does nothing with it. If I go to the first line and hit <return> after the last bar, it turns the line into a table with a header row (since it has double-bars). If I go to the second line and hit <return> after the last bar, it creates A SEPARATE TABLE with the data in it. I can go to the first table (created from the header row), tell Confluence to add a row below, then copy the data from the second table into that second row and it will do it. But I will need to repeat that sequence for EACH ROW OF DATA.

I've just lived with in this in the past. When there's only a few rows, no biggie. But I'm trying to create a table with 200+ rows. That sequence just isn't acceptable for this amount of work.

Suggestions on how to get this working?

Neckwear answered 9/5, 2016 at 14:25 Comment(2)
Are you using Chrome as your browser?Evetteevey
Please refresh. I edited and commented that I get the same behavior from Chrome and from FireFox.Neckwear
E
3

According to this link, I'd assume it's a bug with the version of Confluence, at least as far as the sorting goes.

Looking through the Confluence JIRA, there appear to have been several issues with copy/pasting from Excel over the development. At least there's a workaround:

Workaround:

  • Go to the editor again

  • Cut out the (unsortable) table

  • Paste it again

  • Mark the first row as Header

  • Save the page

-> Now the table is sortable

If that does not work, please install the The confluence source editor, then edit the page to:

  1. Remove the row " "

  2. Replace all "td" tag to "th" tag for the first row of the table. For example, the column name "Number" will need to change from "Number" to "Number".

Evetteevey answered 9/5, 2016 at 14:47 Comment(2)
I tried paste -> cut -> paste -> save and that didn't help. I tried starting with a saved one -> edit -> cut -> paste -> save but that didn't help either.Luckily, they've already installed the sourced editor. Ended up reformatting my data into TR / TD tag pairs and pasting that into the TBODY pair and that got it all working. Thank {deity} for gvim and macros.Neckwear
See the Google Sheets answer below from @Locane. Works like a charm.Papua
P
22

I went a circuitous route to accomplish this:

  • Made a text file with my information and tab-separated the fields
  • Pasted this data in to Google Sheets
  • Copied the cells from Google Sheets
  • Pasted them in to the a pre-made table in Confluence

It was still faster than writing each field manually.

Popp answered 2/2, 2017 at 18:4 Comment(3)
This work very fine! thanks you. To paste CSV data, use Google Sheets, that is clever to detect it.Hewe
Quick and easy. Used this suggestion several times!Papua
I was able to do it using Excel as well.Desex
Y
12

To insert large tables with the second option you need to first hit Ctrl + Shift + D and then paste in the table in wiki markup form.

Wrap the table in any macros required if you know the macro name and parms. This can be a serious PITA to do after a table has been created in the Confluence 5 GUI.

Click Insert and the resulting table will be converted to the new wiki format into the page.

Yacketyyak answered 6/7, 2016 at 1:43 Comment(1)
I got to the point of attaching the table as a csv to the page then displaying it with a macro.Yacketyyak
E
3

According to this link, I'd assume it's a bug with the version of Confluence, at least as far as the sorting goes.

Looking through the Confluence JIRA, there appear to have been several issues with copy/pasting from Excel over the development. At least there's a workaround:

Workaround:

  • Go to the editor again

  • Cut out the (unsortable) table

  • Paste it again

  • Mark the first row as Header

  • Save the page

-> Now the table is sortable

If that does not work, please install the The confluence source editor, then edit the page to:

  1. Remove the row " "

  2. Replace all "td" tag to "th" tag for the first row of the table. For example, the column name "Number" will need to change from "Number" to "Number".

Evetteevey answered 9/5, 2016 at 14:47 Comment(2)
I tried paste -> cut -> paste -> save and that didn't help. I tried starting with a saved one -> edit -> cut -> paste -> save but that didn't help either.Luckily, they've already installed the sourced editor. Ended up reformatting my data into TR / TD tag pairs and pasting that into the TBODY pair and that got it all working. Thank {deity} for gvim and macros.Neckwear
See the Google Sheets answer below from @Locane. Works like a charm.Papua
F
2

Now, in 2023-2024, with Confluence 7.19, you can paste from Excel into a Confluence page, and it will create a Confluence table.

Forefend answered 9/2 at 0:22 Comment(0)
A
0

My Excel has 10 K rows and some rows are with background color. To maintain the Cell background color I followed this steps

  1. Saved the Excel File as HTML File

  2. Open the HTML code, Copy the Complete TABLE (HTML CODE)

  3. In Confluence page Insert HTML Macro

enter image description here

  1. Insert your codes and see the cell color will maintain. enter image description here
Astound answered 25/6, 2019 at 0:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.