Write excel from ruby

Hi,
I did search for write xls from Ruby and all dated like in 2010, I think
there some new classes for this?

I just installed gem spredsheet for now, is it enough? I need to read
xls, then massage it and write out in new format, can I just compose a
whole line of new format and then write it in one shot pointing to the
row, not by individual cells?

book = Spreadsheet.open('c:\\Ruby193\\1500.xls')
sheet1 = book.worksheet('NPI')
sheet1.each do |row|
  break if row[0].nil?
  //array = row.join(';')
  //newline = array[0]...[3]
  // writeout new xls from newline???
end

Thanks
Dai

I have used
roo
for some excel to xxx conversion, it can also create sheets. I was
fairly impressed with what I read on the webpage, and it certainly
worked well for what I needed it for.

reid

What platform are you on? If you’re using windows and have excel
installed you can just use:

http://ruby-doc.org/stdlib-1.9.3/libdoc/win32ole/rdoc/WIN32OLE.html

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs