Reputation: 4261
How can I convert a cell value to uppercase using AXLSX gem? I don't find any option from the docs (See Screenshot)
The problem is, when I try adding a formula to cell, the formula is taken in lowercase and doesn't seem to work (See Screenshot), but when I manually edit the formula in excel and make it uppercase, it starts working
CODE
cell.type = :string
cell.value = "=CEILING.MATH((K4+O4+C30)/3)"
cell.style = workbook.styles.add_style( { :alignment => { :vertical => :center, :wrap_text => true } } )
NOTE: I'm using LibreOffice in Ubuntu 18. Also, I'm aware of =UPPER(text)
. But, I don't understand how to apply it to a FORMULA.
Upvotes: 0
Views: 179
Reputation: 4261
I couldn't find the exact solution, but, I found a workaround of formula. Now, this works on LibreOffice too
So, I used:
"=CEILING.MATH(((K4+O4+C30)/3), 1)"
instead of
"=CEILING.MATH((K4+O4+C30)/3)"
NOTE: I'm still waiting for someone to give actual answer to my question. I just shared this workaround, in case someone finds this helpful. But, I'll not accept this as answer.
Upvotes: 0