Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Can attributes such as background color be encoded in a raw .csv file?

I know about conditional formatting, where field attributes can depend on contents of the field or other fields. What I'd like to do is colorize certain fields as determined programmatically while generating a raw separator-separated list, so that when importing into LibreOffice, those fields will be colorized.

Of course, I can add a new column with a flag indicating whether the field should be colorized, but this still requires me to do the conditional formatting after importing the .csv file. I want the .csv file to be portable so that anyone who just imports it will see the colorized fields.

I'm envisioning syntax something like this to cause the third column in this row to be red:
data 1~data 2~<red>data3</red>~data4~