I'm saving Rails data into an Excel spreadsheet using the gem AXLSX_RAILS.
I have some text fields that are stored as HTML in the database.
This is my attempt to convert the HTML to text:
sheet.add_row ['REVENUE DESCRIPTION', strip_tags(@costproject.revenue).gsub!(" ", "")]
That works to remove the HTML tags.
But, I would like to replace
with the Excel new line (code 10 - vbLf).
How can I do that?
I tried this:
sheet.add_row ['DESCRIPTION', strip_tags(@costproject.description).gsub!(" ", vbLf)]
Thanks for the help!