How to copy a column with conditional format by "value" - Libreoffice 4.1

2

I have a column that contains the data and a set of rules for the conditional format of the cells.

i.e. the conditional format changes the background colour of some cells if they are negative.

I would like to copy this column with the resulting format and paste it in another place "by value", in our example I want as result a column without any more conditional formatting rules for the cells but only with the computed colour for the background (with the computed format).

  • If I use paste special with only text and number options checked I lose the background colour.
  • If I use paste special with format option checked I copy even the rules.

Is there any way to do it without a macro? Thanks

Hastur

Posted 2013-09-25T10:49:59.530

Reputation: 15 043

It should be nice to know the reason of the down vote to improve the question. – Hastur – 2015-09-28T09:43:25.210

Maybe it is time to think to a macro too... – Hastur – 2015-12-17T13:28:01.750

Answers

1

AFAIK, there's no perfect solution for this kind of task. The best practice depends on the contents of your sheet - especially, if you want to keep formulas, too.

Generally, you can drop the rules regarding conditional formatting by saving the sheet as HTML, and re-loading the HTML into Calc. Of course, this will drop stuff like functions, too - just keeping the calculation results. It will also drop style sheets.

If you want to keep, e.g., functions, you may proceed as described, but keep the original file. Now, copy the imported HTML, and paste just the formats, keeping the original cell content. The result should be a Calc sheet with original cell content and non-conditional formatting. Maybe overkill again, but this depends on your needs...

tohuwawohu

Posted 2013-09-25T10:49:59.530

Reputation: 8 627

Thanks for the workaround. Nice. Does the html export keep format as width and height of the cells too? At the time of the question it liked to mess up a little... :) – Hastur – 2015-12-19T16:24:50.480

Hmm - no, cell heigth / width are lost when re-opening the html in Calc. – tohuwawohu – 2015-12-19T16:30:29.653

Thx again. Next year I will search for the calc wishlists or I will surrend to do a macro... – Hastur – 2015-12-19T16:35:43.640

Just found out that custom cell heigth / width will be kept if you paste just the formats from the imported HTML to the original content. So, pasting the "direct formats" from the HTML export / import will just transfer stuff like background colors. – tohuwawohu – 2015-12-19T16:38:45.610

Thx. On Monday I will try with the original file... now I'm without computer. – Hastur – 2015-12-19T16:44:28.663