From: Junegunn Choi Date: 2011-11-24T13:58:19+09:00 Subject: Re: Create Excel Sheet(.xls/.xlsx) Are you sure you want to write your own code for handling Excel binary format? I suggest you try 'spreadsheet' gem. require 'spreadsheet' book = Spreadsheet::Workbook.new sheet = book.create_worksheet book.write 'test.xls' -- cheers, junegunn choi.