felixbuenemann / xlsxtream

Streaming & Fast XLSX Spreadsheet Writer for Ruby
MIT License
217 stars 38 forks source link

Why the opening mode of the file is 'wb'? #33

Closed emanuelgauler closed 5 years ago

emanuelgauler commented 5 years ago

I suggest that the opening mode can be determined by the user, because when I want to modify an existing file, it is truncated.

felixbuenemann commented 5 years ago

XLSX files are ZIP archives with binary data.

There's no way to append to it anyways, so I'm not sure what you are trying to achieve.

By the way you can pass an open IO-like object to Xlsxtream::Workbook.new or .open, so you can open a file in whichever mode you like.