summaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorStefan <[email protected]>2022-09-26 20:16:59 +0200
committerStefan <[email protected]>2022-09-26 20:16:59 +0200
commitbcc88ca556b3b8527ba0ad56424f93ef170b9c31 (patch)
treee6251486043e03f4d7def5dbac4bf043540dbc2a /examples
parent2ed0f25b31aa7ced3ff4e1f8307424be7624c667 (diff)
downloadcaxlsx-bcc88ca556b3b8527ba0ad56424f93ef170b9c31.tar.gz
caxlsx-bcc88ca556b3b8527ba0ad56424f93ef170b9c31.zip
Make sure all examples and docs use binary mode for reading / writing XLSX files
Not using binary mode can cause encoding issues, see #138.
Diffstat (limited to 'examples')
-rw-r--r--examples/stream_example.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/stream_example.md b/examples/stream_example.md
index 409cc8fb..1d2af693 100644
--- a/examples/stream_example.md
+++ b/examples/stream_example.md
@@ -16,7 +16,7 @@ wb.add_worksheet(name: 'Basic Worksheet') do |sheet|
end
stream = p.to_stream
-File.open('stream_example.xlsx', 'w') { |f| f.write(stream.read) }
+File.open('stream_example.xlsx', 'wb') { |f| f.write(stream.read) }
```
## Output