axlsx
axlsx copied to clipboard
Style only a part of string
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.
It's possible, please check this sample: https://github.com/randym/axlsx/blob/73d9477fc33706f4a186e92794134248fb389183/examples/example.rb#L852