axlsx icon indicating copy to clipboard operation
axlsx copied to clipboard

Style only a part of string

Open firel246 opened this issue 8 years ago • 1 comments

Is it possible to style only a part of text? text = "Some kind of a text:" sheet.add_row [text + users, "" ], style: [ get_footer_style(), get_footer_style() ], :height => 20*((text.length + users.length)/50)

I'd like to style only the 'users' string, to be specific - change its font color. I tried putting it in different columns with different styles and merging, but merge deletes cell content.

firel246 avatar Sep 12 '17 13:09 firel246

It's possible, please check this sample: https://github.com/randym/axlsx/blob/73d9477fc33706f4a186e92794134248fb389183/examples/example.rb#L852

amrfaisal avatar Mar 05 '18 17:03 amrfaisal