Ask Your Question

# Copy from Calc into text editor with spaces instead of tabs

Hi all,

If I copy a text from a text editor into Calc, it asks what I want the cell separators to be (tab, space, etc), but that doesn't work the other way round so sometimes I have to replace all the subsequent tabs in a newly created text file with spaces. Is there a way to tell Calc to export cell separators as spaces instead of tabs?

Thanks, Tom

edit retag close merge delete

## 2 Answers

Sort by » oldest newest most voted

A workarount might be to 'Paste Special...' (Ctrl+Shift+V) with option 'Formatted text [RTF]' .
This way you get a table which you may select as a whole and 'Table' > 'Convert' > 'Table to Text' with (e.g.) a space chosen as the separator.
If you can get exactly your wanted result will depend on circumstances I don't know of.

more

@Lupp's answer will not produce a fixed width result. For example, this:

Becomes this:

a  d
b c e


A better way is to go to File -> Save As and choose Save as type: Text CSV. Check Edit filter settings and then Fixed column width. The result:

a                     d
b          c          e


Some text editors such as Vim can also do this. Copy and paste from Calc into Vim and then do :retabas described at http://vim.wikia.com/wiki/Converting_....

For more precise control, write a macro like https://superuser.com/a/121206/541756. That example uses Excel, but I've seen similar examples recently for LibreOffice.

more

## Stats

Asked: 2017-10-13 12:29:12 +0200

Seen: 299 times

Last updated: Oct 13 '17