How can I clear the content of cells in a table?
Asked by Eric Ladouceur:

Hi all,

I have a Confluence table and I would like to delete the content of a handful of cells. I can enter the Edit mode, then I can select the cells I would like to clear, but when I press the delete key, entire rows are being deleted instead of the selected cells.

Lets say I have a 5x5 table and I select cells B4, B5, C4, C5. I see those cells being highlighted, but when I release the mouse to look at my selection, I see that Firefox is also selecting the text in cells B4, B5, C1, C2, C3, C4, C5... So when I press the delete key, all cells in row C get deleted.

I am running Confluence 5.6.3 on Firefox 25.0.


Answers:
author: ElizabethC
body: This is beyond embarrassing.

I use the tables to log test results, and you have to delete EVERY SINGLE CELL manually.

Date command object doesn't delete but char by char most the time., so its backspace about 10 times to clear a date. you can't double click in a cell and get it to highlight it all. It stops working. (CHROME).

You do CTRL -A it highlights the entire page. This is AWFUL functionality.

comments: author: Peter White
body: I find that when I highlight several cells it will only visibly highlight the first one though it will delete the remaining cells "invisibly" highlighted. Trouble is that you **can't** **see** what is being highlighted (exception of first cell) so its real guess work!!

I resort to the more onerous approach by importing Excel sheets for others to review on more complex arrangements.

As you say it is an **AWFUL** functionality with still no improvements.

C'mon Atlassian!!


author: ElizabethC
body: My "work around" is I created templates of my test cases pages, and tell my testers to "make a copy" and modify the title to reflect the date of their test pass.. but dang, how tedious.


author: Peter White
body: FYI, an email I received :

"We have had this reported previously where [CONFCLOUD-24245: Delete Table Cell](https://jira.atlassian.com/browse/CONFCLOUD-24245). However, as mentioned by our Product management team in the comments, this feature will not be implemented in the near future.

The workaround for this is to merge dangling cells into the left cell.

Now, i understand that this feature request has been quite some time.  
What i am planning to do is to raise this with our Product management team again to see whats their intake on deleting cell tables currently.

Please allow us some time to review this further.

Thanks,"  


author: Peter White
body: This is a pretty basic function Confluence should be able to offer in their tables :(

comments: author: Karthik Chembu
body: Really Bad Confluence have lot of limitations. Even for this small functionality too.


author: Kiran Singh
body: Another workaround is to cut the data. You can highlight the cells the do crtl/cmnd + x -- this will "remove" and replace the highlighted cells.

comments: author: Vishal Kulkarni
body: this works for me, thank you


author: Peter White
body: Again all workarounds when a simple command should be available - otherwise Atlassian should not offer tables!


author: Matt Smith
body: an easier way is to use the merge cells function to merge all cells in a select column or row, then just highlight text all in one cell hit delete, then split cells again.

However in 2018 i expect a paid for text content editor like Confluence to have such basic functionality. The only value in Confluence is that it links easier with other Atlassian Products with a little integration. However using Google sheets and linking to a JIRA ticket for example is a better alternative for me at this point. Depends on how deeply you use Confluence i suppose.

comments: author: Peter White
body: Thanks for the tip.

Again this seems excessive to simply delete numerous rows/columns of data or selected data.

Atlassian should either offer an enhanced functionality (albeit still basic) or don't.


author: shaun.griffith
body: Mostly works. However, funky elements in adjacent cells, such as checkboxes, get copied into the unmerged cells. That is:

1. Select cells to merge
2. Merge cells
3. Select text in merged cell
4. Delete text
5. Unmerge cell
6. Checkboxes from adjacent cells are copied into the unmerged cells automatically.

This surely implies that the underlying structure is not manipulated correctly.


author: ZanyBaka
body: You can create a bookmark in Chrome and assign the following JavaScript

javascript\&colon;document.querySelectorAll('iframe').forEach((i) =\> i.contentWindow.document.querySelectorAll(".mceSelected").forEach((td) =\> { td.innerText = '' }))

The script just finds all the selected cells (td\[class=.mceSelected\]) and clears their content.


author: Den Ramos
body: There's a workaround for this. Just open up a spreadsheet program, copy and paste the same number of empty columns / rows you want and paste it in to override the cell range.


author: Guilherme Nedel [Atlassian]
body: Hello Eric, this is reproduceable in other browsers as well, and was documented a while ago in [this issue ticket](https://jira.atlassian.com/browse/CONF-24139). I agree that there should be a better manner to remove contents from a table, turns out it appears not have a straight forward resolution at this time - only the workaround of removing each cell content with *double click + delete*.

comments: author: Joyce Bailey
body: [@Guilherme Nedel](/t5/user/viewprofilepage/user-id/781570) Still no solution for this?


author: Joyce Bailey
body: [@Guilherme Nedel](/t5/user/viewprofilepage/user-id/781570) nevermind, highlighted the data worked!


author: ElizabethC
body: Did you just highlight for one cell? Your "what worked" isn't clear. The issue is a "Wont' Fix" Which is terrible for large cells.