Hi All,
I'm experiencing an issue where the generated CSV columns can't be rendered correctly in MS Excel.
I tried some solutions in https://stackoverflow.com/questions/30368173/ruby-how-to-generate-csv-files-that-have-excel-friendly-encoding, but they didn't work.
The one that worked was not using the CSV Shaper:
BOM_PREFIX = "\xEF\xBB\xBF".freeze
self.response_body = CSV.generate("\uFEFF") do |csv|
csv << [BOM_PREFIX+ "Text a", "Text b", "Text æ", "Text ø", "Text å", "£999.99"]
end
With the codes above, all characters are shown correctly in MS Excel.
I'm wondering if there are any ways to achieve this within CSV Shaper?
Thanks.
Hi All,
I'm experiencing an issue where the generated CSV columns can't be rendered correctly in MS Excel.
I tried some solutions in https://stackoverflow.com/questions/30368173/ruby-how-to-generate-csv-files-that-have-excel-friendly-encoding, but they didn't work.
The one that worked was not using the CSV Shaper:
With the codes above, all characters are shown correctly in MS Excel.
I'm wondering if there are any ways to achieve this within CSV Shaper?
Thanks.