How to access row value using spreadsheet? How to find last row or end of file using roo? How to convert xls to csv? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
google "ruby excel" On Feb 17, 11:54 pm, Salil Gaikwad <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> How to access row value using spreadsheet? > How to find last row or end of file using roo? > How to convert xls to csv? > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Salil, To convert xls to csv and then parse for use in ruby, you could try wrapping xls2csv (http://www.wagner.pp.ru/~vitus/software/catdoc/) and parsing via CSV (http://www.ruby-doc.org/stdlib/libdoc/csv/rdoc/ index.html), something like: $ irb irb(main):001:0> require ''csv'' => true irb(main):002:0> csv_raw = `xls2csv test.xls`.sub(/\s+$/, "\n") => "\"fruit\",\"color\"\n\"banana\",\"yellow\"\n\"strawberry\",\"red \"\n\"tangerine\",\"orange\"\n" irb(main):003:0> CSV.parse(csv_raw) {|rec| puts rec.inspect } ["fruit", "color"] ["banana", "yellow"] ["strawberry", "red"] ["tangerine", "orange"] => nil Jeff On Feb 17, 8:54 pm, Salil Gaikwad <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> How to access row value using spreadsheet? > How to find last row or end of file using roo? > How to convert xls to csv? > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---