hi i wanted to upload a file using file uploader. alsoi wanted to add those contacts in those excel file to contact list how i can do this in rails.pls help -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Tony Augustine wrote:> hi i wanted to upload a file using file uploader. alsoi wanted to > add those contacts in those excel file to contact list how i can > do this in rails.pls helpTo upload look at the paperclip plugin: http://github.com/thoughtbot/paperclip Excel is a bit more tricky, if you are on windows you can automate it with win32ole: http://rubyonwindows.blogspot.com/2007/03/automating-excel-with-ruby.html If not you can try parseexcel http://www.codeweblog.com/parseexcel-ruby-used-to-read-excel/ I haven''t had huge success with that though (images in files have caused problems for me) and I''ve tended to just get users to upload a csv instead and use the built in CSV or FasterCSV - there are some other options listed here: http://snippets.aktagon.com/snippets/246-How-to-parse-CSV-data-with-Ruby Kind Regards Luke -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Luke Pearce wrote:> Tony Augustine wrote: >> hi i wanted to upload a file using file uploader. alsoi wanted to >> add those contacts in those excel file to contact list how i can >> do this in rails.pls help > > To upload look at the paperclip plugin: > > http://github.com/thoughtbot/paperclip > > Excel is a bit more tricky, if you are on windows you can automate it > with win32ole: > > http://rubyonwindows.blogspot.com/2007/03/automating-excel-with-ruby.html > > If not you can try parseexcel > > http://www.codeweblog.com/parseexcel-ruby-used-to-read-excel/ > > I haven''t had huge success with that though (images in files have caused > problems for me) and I''ve tended to just get users to upload a csv > instead and use the built in CSV or FasterCSV - there are some other > options listed here: > > http://snippets.aktagon.com/snippets/246-How-to-parse-CSV-data-with-Ruby > > Kind Regards > Lukeactuallly i think u ddnt get ma requirement i wanted to upload a file using paperclip plugin and then i need to upload an excell sheet intodb which shows d path of files and some more parameters.also how i can take values from an csv file? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
You might need to use a parser like fastercsv to get values out of your csv. David On Mar 24, 2010 5:16 PM, "Tony Augustine" <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: Luke Pearce wrote: > Tony Augustine wrote: >> hi i wanted to upload a file using file uploader.... actuallly i think u ddnt get ma requirement i wanted to upload a file using paperclip plugin and then i need to upload an excell sheet intodb which shows d path of files and some more parameters.also how i can take values from an csv file? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed... -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.