Ask Your Question
0

How can I prevent calc from converting tabs to spaces in cells?

asked 2015-11-30 17:28:53 +0200

Ian Mackinnon gravatar image

I have a CSV file, some of whose cells contain tab characters in their text. If I edit any text within these cells and then exit the cell, the tab characters are automatically converted to spaces. I would like to prevent this from happening.

Where can I disable this behaviour?

(I don't know how simple this is to reproduce, as I can't actually work out how to explicitly insert a tab character in a cell in Calc. It may be necessary to create the CSV in some other software.)

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
0

answered 2015-12-05 14:52:26 +0200

pierre-yves samyn gravatar image

Hi

Sorry, AFAIK you can not disable this... Workaround to simulate tab could be to use FormatCellsAlignment tab▸Text Alignment

  • Horizontal: Left
  • Indent: adapt according to the need

Regards

edit flag offensive delete link more
0

answered 2015-12-05 22:58:47 +0200

Lupp gravatar image

Csv containing HT (ASCII X09) are a strange idea. Calc cells nowadays can contain HT but since there are no tab positions in cells it cannot be functional. It simply is not displayed at all. This behaviour might even not be specified anyway. Directly editing the cell's content results in replacing HT with SP (ASCII X20) as you reported correctly.

As long as HT are actually imported into your sheets you may prevent them from being automatically replaced with the nondistinctive space substituting them explicitly with a placeholder of your choice. I suggest to use a RightArrow (like the glyph displayed in Writer for HT when the option is chosen.)

=SUBSTITUTE(C11;UNICHAR(9);UNICHAR(8594))

Will do this for C11, eg. returning the result to another cell.

In situ you may use 'F&R' with \u0009 in 'Search for' and the character of your choice in 'Replace with'.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2015-11-30 17:28:53 +0200

Seen: 107 times

Last updated: Dec 05 '15