excelexcel-formulatrimconfluence

How do I remove the leading space in an Excel cell having imported from Confluence


I've looked at similar questions but haven't managed to find an answer.

In a Confluence space, I went to Space Settings > Manage Space > Export Space > PDF. I then selected the "Select what to export" radio button which showed me a tree structure view of the space.

Instead of exporting to PDF, I just copied that tree structure and put it into Excel (as I was really just after a list of existing pages to work with).

There's a leading space at the start of every cell that I can't seem to get rid of. It is removed by a simple find and replace, but that also removes the spaces between words which I don't want to keep. I've tried the following but none of them remove the leading space:

=TRIM(A1)
=TRIM(CLEAN(A1))
=TRIM(SUBSTITUTE(A1,CHAR(160),""))
=TRIM(CLEAN((SUBSTITUTE(A1,CHAR(160),""))))

I've also tried removing all the hyperlinks in case that was the issue and then retried the above trims but this didn't work either.

Any ideas??


Solution

  • When editing the hyperlink, you can see the leading space in "Text to display". That may be why TRIM etc. do not work.

    =REPLACE(cell,1,1,"") seems to work though, not sure whether it is applicable for your purpose.

    BTW, it seems to be a 'regular' space (U+0020).