Migrate Excel (MS Access) to Rails

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.

John S. 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

If you’re using CSV to import the date I recommend using fastercsv:
https://rubyforge.org/projects/fastercsv/


Ryan B.
http://www.frozenplague.net
Feel free to add me to MSN and/or GTalk as this email.

On 04/01/2008, John S. [email protected] 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 P.
[email protected]
[email protected]
Büro: 030 - 830 353 88
mobil: 0176 - 75 03 03 04
Privat: 030 - 49 78 37 06


http://www.thopre.com/

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