Is there any form to migrate an Excel table(which becomes from Access)to Rails? I have the models with scaffolds, but I would like to have all the data with only a migration. -- 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 -~----------~----~----~----~------~----~------~--~---
John Smith wrote:> Is there any form to migrate an Excel table(which becomes from Access)to > Rails? I have the models with scaffolds, but I would like to have all > the data with only a migration.i don''t know about any ''direct'' way to do that. but it should be rather easy to export csv and write a small controller/action in rails to import it. maybe you can even do something from script/console -- 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 -~----------~----~----~----~------~----~------~--~---
If you''re using CSV to import the date I recommend using fastercsv: https://rubyforge.org/projects/fastercsv/ -- Ryan Bigg http://www.frozenplague.net Feel free to add me to MSN and/or GTalk as this email. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 04/01/2008, John Smith <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > Is there any form to migrate an Excel table(which becomes from Access)to > Rails? I have the models with scaffolds, but I would like to have all > the data with only a migration.you could export the spreadsheet data with my gem ''roo'' ( http://roo.rubyforge.org/) and then load these yaml files into your database as it is described here: http://www.urbanpuddle.com/articles/2007/10/19/load-fixed-data-into-your-rails-app -Thomas -- Thomas Preymesser thopre-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org thomas-/SbBnL9XF//QT0dZR+AlfA@public.gmane.org Büro: 030 - 830 353 88 mobil: 0176 - 75 03 03 04 Privat: 030 - 49 78 37 06 http://thopre.wordpress.com/ http://www.thopre.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 -~----------~----~----~----~------~----~------~--~---