can you not use the worksheet.Range method?
ie
require 'win32ole'
excel = WIN32OLE::new('excel.Application')
excel.visible = true
workbook = excel.workbooks.add
worksheet = workbook.Worksheets(1)
i = 1
"a".upto("z") {|s|
worksheet.Range("A#{i.to_s}:B#{i.to_s}").value = [s, s.next]
i+=1
}
On 8/10/06, Sam Smoot <ssmoot@gmail.com> wrote:
> > Where exactly in the FasterCSV code are you stating, "first part",
> > "second part". Would it be the same as just saying "#{firstitem},
> > #{seconditem}\n"?
>
> The "csv << [ 'first part', 'second part' ]"
>
> The csv object passed into the block by FasterCSV::open just expects an
> array of values. It handles the escaping of those values internally.
> Yes, it's fully compatible with Excel, produces a lot smaller files, is
> faster, simpler, and works with pretty much any text editor if you
> don't have Excel handy.
>
> I used to try to do everything with Excel Automation, but then it
> dawned on me... unless you want colored headers, custom fonts, multiple
> sheets, etc, there just isn't good reason I should be targetting Excel
> and excluding everyone that doesn't have it, when I can just go with
> the simpler CSV and it's available to everyone then (including Excel
> users of course).
>
> That's just my rationale tho'. Sometimes people do want the colored
> headers, multiple sheets, etc. ;-)
>
>
>