Skip to content

Commit

Permalink
Update file open mode to binary
Browse files Browse the repository at this point in the history
* rubyzip 2.3.0からエンコーディング結果がASCII-8BITに変更された
  * rubyzip/rubyzip#439
  • Loading branch information
yn-misaki committed Apr 4, 2024
1 parent 9022c2b commit b46b98e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/xlsx_templater/xlsx_creator.rb
Expand Up @@ -12,7 +12,7 @@ def initialize(template_path, data, escape_html = true)
end

def generate_xlsx_file(file_name = "output_#{Time.now.strftime('%Y-%m-%d_%H%M')}.xlsx")
File.open(file_name, 'w') do |f|
File.open(file_name, 'wb') do |f|
f.write(generate_xlsx_bytes.string)
end
end
Expand Down

0 comments on commit b46b98e

Please sign in to comment.