Add contacts in those excel file to contact list

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

Tony A. 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
Luke

Luke P. wrote:

Tony A. 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
Luke

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?

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 A.” [email protected] wrote:

Luke P. wrote: > Tony A. 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…

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