-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid byte sequence in UTF-8 when generating spreadsheet #37
Comments
@straydogstudio any updates? |
Sorry @samuelshih I haven't been able to get to it. One way you could help is to create a simple Rails repo in Github that demonstrates the issue. Then I won't have to set that up, and it will make sure I have the setup you do (with the entire Gemfile.) Would you be willing to do that? |
@straydogstudio I figured it out!!
The template in the xlsx block
It was always breaking on |
Fantastic! That's great. I think I may know what that means then, but I'll have to check on that. Nice to have a simple solution! |
I'm going to leave this open as a reminder to look into this. |
Hey @straydogstudio , I also faced the same problem. It looks like rails are trying to surround the xlsx file with layouts: To fix this problem I have to either rename the axlsx template or by passing
I prefer the later one. |
@kikihakiem Thanks for the update. The format.xls really shouldn't come into play, as I don't register anything under that MIME type. But that is interesting. What Rails / Axlsx / axlsx_rails versions do you have? |
Rails 4.2.4, axlsx 2.0.1, axlsx_rails 0.4.0 |
I have not been able to reproduce this bug. But, based on the experience of others (here and in other issues) the latest release of axlsx_rails (0.5.0) explicitly sets layout to false. Advising others to set the layout to false appears to fix these issues. I am cautiously optimistic. Please try 0.5.0 and comment on this issue (or open another) if the failure happens again. |
ref #29 (dupe) |
@straydogstudio
In my rails app, I'm trying to attach a generated xlsx file (basic) in a Sidekiq delayed mail. I'm getting the
error: WARN: invalid byte sequence in UTF-8
every time I run the sending jobs.mailer.rb
report.xlsx.axlsx
Gem version 0.3.0, Rails 4.1.7, Ruby 2.2.0
Gemfile
If I comment out the xlsx block, email sends fine.
Thanks for your help in advance 😄
The text was updated successfully, but these errors were encountered: