I am running into the following error when trying to use the gem. I suspect its because I am using data with wrong encoding. I am not sure how to solve it though and any ideas are welcome. My code looks like this:
Xlsxtream::Workbook.open(filename) do |xlsx|
xlsx.write_worksheet WORKSHEET_NAME do |sheet|
sheet << headings
end
end
headings here is an array of values. Do the values have to be in a particular format?
I tried the example provided:
Xlsxtream::Workbook.open(filename) do |xlsx|
xlsx.write_worksheet WORKSHEET_NAME do |sheet|
# Boolean, Date, Time, DateTime and Numeric are properly mapped
sheet << [true, Date.today, 'hello', 'world', 42, 3.14159265359, 42**13]
end
end
and even this is giving me Encoding::UndefinedConversionError: "\x91" from ASCII-8BIT to UTF-8. The character is different. But the same error.
I am running into the following error when trying to use the gem. I suspect its because I am using data with wrong encoding. I am not sure how to solve it though and any ideas are welcome. My code looks like this:
headings
here is an array of values. Do the values have to be in a particular format?I tried the example provided:
and even this is giving me
Encoding::UndefinedConversionError: "\x91" from ASCII-8BIT to UTF-8
. The character is different. But the same error.