Writing a large file with Spreadsheet: very slow, any HELP?

75 views
Skip to first unread message

Joe Peck

unread,
Mar 16, 2010, 4:30:07 PM3/16/10
to rubyonra...@googlegroups.com
Hey,

I'm using the Spreadsheet gem to generate Excel files. It's worked
great up until now.

I'm trying to put 25,000 rows in a sheet, then doing book.write to write
the file. It's really slow, like 3-4 minutes.

Is there a way to write groups of rows to a sheet at a time, or some
other way to speed up this process? Thanks in advance for any advice.
--
Posted via http://www.ruby-forum.com/.

Joe Peck

unread,
Mar 17, 2010, 8:54:34 AM3/17/10
to rubyonra...@googlegroups.com
Joe Peck wrote:
> Hey,
>
> I'm using the Spreadsheet gem to generate Excel files. It's worked
> great up until now.
>
> I'm trying to put 25,000 rows in a sheet, then doing book.write to write
> the file. It's really slow, like 3-4 minutes.
>
> Is there a way to write groups of rows to a sheet at a time, or some
> other way to speed up this process? Thanks in advance for any advice.

Oh yeah, I'm using the latest Spreadsheet gem, 0.6.4.1 if that makes a
difference. Any thoughts on how to speed up the writing process?

David Chua

unread,
Mar 17, 2010, 11:31:10 AM3/17/10
to rubyonra...@googlegroups.com
I hope you're sending those tasks to a background worker...

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.


Joe Peck

unread,
Mar 17, 2010, 11:35:38 AM3/17/10
to rubyonra...@googlegroups.com
David Chua wrote:
> I hope you're sending those tasks to a background worker...

Not yet, but that's probably the route I'll be going.

Reply all
Reply to author
Forward
0 new messages