19

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?

ManoDestra
  • 6,325
  • 6
  • 26
  • 50
Meower68
  • 929
  • 9
  • 21

4 Answers4

17

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.

Locane
  • 2,886
  • 2
  • 24
  • 35
11

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.

Underverse
  • 1,271
  • 21
  • 32
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".

Community
  • 1
  • 1
TriskalJM
  • 2,393
  • 1
  • 19
  • 20
  • 1
    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. – Meower68 May 09 '16 at 15:01
  • 1
    See the Google Sheets answer below from @Locane. Works like a charm. – Doug Knudsen Jul 14 '17 at 20:31
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
AnNaMaLaI
  • 4,064
  • 11
  • 53
  • 93