felixbuenemann / xlsxtream

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

Column widths #25

Closed pond closed 6 years ago

pond commented 6 years ago

I wanted to be able to specify column widths by pixel or character in Excel output. The purpose of the gem is to stream out data, so the idea of scanning every source data row in an attempt to get the maximum column width needed to cover all rows is obviously not tenable. However, we can often either know some of the widths up front (e.g. contains a date-time, or a UUID, or whatever), or we might get useful initial width estimations from just the first few rows of data, computing that up-front before streaming out the spreadsheet. It's this latter approach that I've just used in a Rails application that's streaming data out via the gem fork I've built.

pond commented 6 years ago

OK @felixbuenemann - I think this is ready for re-review (sorry for delay on it, has been a busy few days!).

felixbuenemann commented 6 years ago

@pond Thanks for your contribution!

I've just released 2.1.0 on RubyGems which includes your changes.