From: Reid Thompson Date: 2012-08-02T05:03:07+09:00 Subject: Re: Write excel from ruby 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 On 8/1/2012 3:01 PM, Mario Trento wrote: > 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? > > [code] > 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 > [/code] > > Thanks > Dai >