http://www.perlmonks.org?node_id=11114198


in reply to Unable to Write Spreadsheet Text in Color

It's just a mistake in the documentation. Use set_color instead.

Also, you need to specify the format as the third argument to write in order to use it:

$format->set_color( 'red' ); $worksheet->write( 'A1', 'test', $format );

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^2: Unable to Write Spreadsheet Text in Color
by roho (Bishop) on Mar 13, 2020 at 01:39 UTC
    Thanks choroba. That was it. And you're right about the format; it was an oversight in my sample code.

    "It's not how hard you work, it's how much you get done."