felixbuenemann / xlsxtream

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

Allow setting number format #48

Open fsateler opened 4 years ago

fsateler commented 4 years ago

Hi,

It would be nice if the number format could be set to something like #,##0 for the whole spreadsheet/book

felixbuenemann commented 4 years ago

Would the setting apply to all numbers or only to decimals?

fsateler commented 4 years ago

I would think to all numbers. As a matter of fact, I would probably set it to #,##0.##### (that is, very similar to the general format, but with thousands separator).

gafrom commented 3 years ago

Hi! If #53 is merged, then what you asked can be achieved by just (a) adding a class to hold number formats (I had put a todo at line 13) and (b) enabling global options to accept num_format key.