Hi! Thank you for awesome gem.
I have one question about usage of rich text. In my project I want to use superscript Excel text feature. Looking for this task led me to this issue #225. For now my implementation looks something like this:
def build_unit(base, exponent)
unit = Axlsx::RichText.new
unit.add_run(base)
unit.add_run(exponent, vertAlign: :superscript)
unit
end
Then I use this build method in add_row call:
worksheet.add_row(
[list_number, label, build_unit("m", "3"), value]
style: [style[:list_number], style[:label], style[:unit], style[:value]]
)
The problem is that style[:unit] doesn't apply to RichText object.
I doesn't know is this a correct behaviour or not, so I wrote two specs which show my assumptions of how this should work. You can see them in this PR #398.
I assume that I can use axlsx api improperly so maybe there is a better solution of assigning rich text run properties from row style.
Hi! Thank you for awesome gem.
I have one question about usage of rich text. In my project I want to use superscript Excel text feature. Looking for this task led me to this issue #225. For now my implementation looks something like this:
Then I use this build method in
add_rowcall:The problem is that
style[:unit]doesn't apply to RichText object.I doesn't know is this a correct behaviour or not, so I wrote two specs which show my assumptions of how this should work. You can see them in this PR #398.
I assume that I can use axlsx api improperly so maybe there is a better solution of assigning rich text run properties from row style.