From: Chuck Remes Date: 2011-05-20T23:28:32+09:00 Subject: Re: Writing formulas to excel spreadsheet On May 19, 2011, at 11:42 PM, Will James wrote: > 7stud -- wrote in post #999761: >> Mike Stephens wrote in post #999754: >>> Have a look at :rubyonwindows.blogspot.com/search/label/excel >>> >>> and look for 'formula' >> >> ...which shows this: >> >> Adding Formulae >> >> emptyRow = 15 >> worksheet.Range("t#{emptyRow}")['Formula'] = >> "=(Q#{emptyRow}+L#{emptyRow}+I#{emptyRow}+S#{emptyRow})" > > Thanks, guys. However, the above seems to require win32ole, for which, > if I'm not mistaken, you need office to be installed on the system. > Is there a way to do this with just the spreadsheet gem (i.e. just > require spreadsheet)? I looked through the code in the spreadsheet gem a few months ago (2?) looking for this functionality. As far as I could tell, it was not yet possible to *write* formulas to a spreadsheet cell. It looks like that functionality is on the roadmap. Look at the "roadmap" section on the homepage: http://spreadsheet.rubyforge.org/ Looks like formula support isn't slated until version 0.8.0 (and we're on 0.6.x right now). cr