livingsocial/excelinator — pull request #5 by maxwell (2014-10-01 01:24:51+00:00)
Title: Create a new method to convert a CSV file that uses much less memory

By exposing a method that takes a file path for the CSV, and a file object, we can save lots of memory in trying to convert a file to an XLS. I noticed that when I converted a ~10mb file, my memory was spiking by 100s of MB during the copy of the CSV string, opening the file, and writing to a new string buffer.

This method allows you to give a local path to a csv file, which it will stream and convert one line at a time. It also lets you pass in a file object to inject the content.