Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-29121

A table copy and pasted from MS Office to Confluence is not sortable

      Issue description:
      The table copy/pasted from MS office is not sortable even making the first row sortable.

      Repro:

      • Create a little Table in Excel
      • Copy it
      • Go to Confluence and paste it into the editor
      • Mark the first row as Header
      • Save the page
      • Check if the table has the sorting feature
        -> It has not

      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 "<colgroup> <col/> <col/> <col/> <col/> <col/> <col/> <col/> <col/> <col/> <col/> <col/> <col/> </colgroup>"
      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 "<td>Number</td>" to "<th>Number</th>".

            [CONFSERVER-29121] A table copy and pasted from MS Office to Confluence is not sortable

            Normand Brousseau added a comment - - edited

            Think I found an even simpler solution – it's working in v5.5.3, anyway:

            • copy the contents directly from the Excel table
            • in the Confluence page, create any new table (2 rows x 2 columns does the job), using the default "Row 1 is header" version
            • paste the Excel contents (whatever its size) into the first cell of the blank table
            • save the page

            In v5.5.3, it seems to always be working. And at least, no additional copy-pasting required, just creating a blank table beforehand...

            Normand Brousseau added a comment - - edited Think I found an even simpler solution – it's working in v5.5.3, anyway: copy the contents directly from the Excel table in the Confluence page, create any new table (2 rows x 2 columns does the job), using the default "Row 1 is header" version paste the Excel contents (whatever its size) into the first cell of the blank table save the page In v5.5.3, it seems to always be working. And at least, no additional copy-pasting required, just creating a blank table beforehand...

            Hi
            I can see same on 5.8.8 ...
            Regards,
            Areg

            AregVrtanesyan added a comment - Hi I can see same on 5.8.8 ... Regards, Areg

            We are on 5.7.3 and the issue is still present. Which version was it fixed in?

            Natasha Liberman added a comment - We are on 5.7.3 and the issue is still present. Which version was it fixed in?

            Which version is the fix in? We are on 5.1.4 (on premise) and are looking to upgrade soon, this is a huge requirement from our team. Thanks!

            Stephen Williams added a comment - Which version is the fix in? We are on 5.1.4 (on premise) and are looking to upgrade soon, this is a huge requirement from our team. Thanks!

            We have an similar problem with an unsortable table.

            For us we solved the problem in this way:

            • Go to the editor again
            • Cut out the (unsortable) table
            • Paste it again
            • marking the hole table >> merge and split cells
            • Save the page
            • -> Now the table is sortable

            Enrico Skottnik added a comment - We have an similar problem with an unsortable table. For us we solved the problem in this way: Go to the editor again Cut out the (unsortable) table Paste it again marking the hole table >> merge and split cells Save the page -> Now the table is sortable

            Hi Nikki - happy to have been of help!

            Normand Brousseau added a comment - Hi Nikki - happy to have been of help!

            I figured out my problem - I had tables within Cells and because that confluence wouldnt sort. Both workarounds works for me when i removed the embedded cells within cells. thank you

            Nikki Hughes added a comment - I figured out my problem - I had tables within Cells and because that confluence wouldnt sort. Both workarounds works for me when i removed the embedded cells within cells. thank you

            Hi Normand - i tried your steps for the workaround but unfortunately it didn't help me

            Nikki Hughes added a comment - Hi Normand - i tried your steps for the workaround but unfortunately it didn't help me

            Also (me again!), the complete workaround should be as follows – this always works for me anyway:

            • create a new table from scratch (the number of cells doesn't seem to matter)
            • copy all cells of the faulty table (which was most likely just pasted from MS Office to the Confluence page) by clicking first in the first (top left) cell, then shift-clicking in the last (bottom right) cell and copying the whole (CTRL-C or contextual menu)
            • paste the clipboard into the first cell of the newly created table
            • delete the "old" table
            • save the page

            Normand Brousseau added a comment - Also (me again!), the complete workaround should be as follows – this always works for me anyway: create a new table from scratch (the number of cells doesn't seem to matter) copy all cells of the faulty table (which was most likely just pasted from MS Office to the Confluence page) by clicking first in the first (top left) cell, then shift-clicking in the last (bottom right) cell and copying the whole (CTRL-C or contextual menu) paste the clipboard into the first cell of the newly created table delete the "old" table save the page

            Allow me to reproduce the following source code from CONF-36458, which was tagged as a duplicate of this issue – it could help with debugging:

            The first table is pasted from Excel, the second one was created via workaround:

                <table>
                  <colgroup>
                    <col/>
                    <col/>
                  </colgroup>
                  <tbody>
                    <tr>
                      <td>Number</td>
                      <td>Customer</td>
                    </tr>
                    <tr>
                      <td>1</td>
                      <td>
                        <a href="http://Atlassian.com">Atlassian.com</a>
                      </td>
                    </tr>
                    <tr>
                      <td>2</td>
                      <td>
                        <a href="http://Bodybuilding.com">Bodybuilding.com</a>
                      </td>
                    </tr>
                    <tr>
                      <td>3</td>
                      <td>
                        <a href="http://Youtube.com">Youtube.com</a>
                      </td>
                    </tr>
                  </tbody>
                </table>
            
            
                <table>
                  <tbody>
                    <tr>
                      <th>Number</th>
                      <th>Customer</th>
                    </tr>
                    <tr>
                      <td>1</td>
                      <td>
                        <a href="http://Atlassian.com">Atlassian.com</a>
                      </td>
                    </tr>
                    <tr>
                      <td>2</td>
                      <td>
                        <a href="http://Bodybuilding.com">Bodybuilding.com</a>
                      </td>
                    </tr>
                    <tr>
                      <td>3</td>
                      <td>
                        <a href="http://Youtube.com">Youtube.com</a>
                      </td>
                    </tr>
                  </tbody>
                </table>
            

            Normand Brousseau added a comment - Allow me to reproduce the following source code from CONF-36458 , which was tagged as a duplicate of this issue – it could help with debugging: The first table is pasted from Excel, the second one was created via workaround: <table> <colgroup> <col/> <col/> </colgroup> <tbody> <tr> <td> Number </td> <td>Customer</td> </tr> <tr> <td>1</td> <td> <a href= "http: //Atlassian.com" >Atlassian.com</a> </td> </tr> <tr> <td>2</td> <td> <a href= "http: //Bodybuilding.com" >Bodybuilding.com</a> </td> </tr> <tr> <td>3</td> <td> <a href= "http: //Youtube.com" >Youtube.com</a> </td> </tr> </tbody> </table> <table> <tbody> <tr> <th> Number </th> <th>Customer</th> </tr> <tr> <td>1</td> <td> <a href= "http: //Atlassian.com" >Atlassian.com</a> </td> </tr> <tr> <td>2</td> <td> <a href= "http: //Bodybuilding.com" >Bodybuilding.com</a> </td> </tr> <tr> <td>3</td> <td> <a href= "http: //Youtube.com" >Youtube.com</a> </td> </tr> </tbody> </table>

              Unassigned Unassigned
              6c217005823d Philip Steinebrunner
              Affected customers:
              22 This affects my team
              Watchers:
              24 Start watching this issue

                Created:
                Updated:
                Resolved: