# Making entire spread sheet as active record

**URL:** <https://www.ruby-forum.com/t/making-entire-spread-sheet-as-active-record/105375>\
**Category:** Ruby\
**Created:** [May 29, 2007, 1:20pm UTC](https://www.ruby-forum.com/t/making-entire-spread-sheet-as-active-record/105375 "2007-05-29T13:20:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![katthi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/43a26b/32.png) [@katthi](https://www.ruby-forum.com/u/katthi)\
**Post date:** [May 29, 2007, 1:20pm UTC](https://www.ruby-forum.com/t/making-entire-spread-sheet-as-active-record/105375/1 "2007-05-29T13:20:38Z")

</div>

hi  
I want to make entire spread sheet as active record model in ruby on  
rails so that i can build applications on top of that .can any one  
know how to do this ?

---

<div class="post-metadata">

**Author:** ![katthi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/43a26b/32.png) [@katthi](https://www.ruby-forum.com/u/katthi)\
**Post date:** [May 29, 2007, 1:41pm UTC](https://www.ruby-forum.com/t/making-entire-spread-sheet-as-active-record/105375/2 "2007-05-29T13:41:41Z")

</div>

katthi wrote:

> hi  
> I want to make entire spread sheet as active record model in ruby on  
> rails so that i can build applications on top of that .can any one  
> know how to do this ?  
> Your best bet is to export the spreadsheet to a CSV, and import that CSV  
> into an SQLite database. You can then use the SQLite database as Rails’  
> database. For more information than that, you’d best ask on the Rails  
> list.

---

<div class="post-metadata">

**Author:** ![katthi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/43a26b/32.png) [@katthi](https://www.ruby-forum.com/u/katthi)\
**Post date:** [May 29, 2007, 6:34pm UTC](https://www.ruby-forum.com/t/making-entire-spread-sheet-as-active-record/105375/3 "2007-05-29T18:34:59Z")

</div>

On 5/29/07, Alex Y. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> katthi wrote:
> 
> > hi  
> > I want to make entire spread sheet as active record model in ruby on  
> > rails so that i can build applications on top of that .can any one  
> > know how to do this ?  
> > Your best bet is to export the spreadsheet to a CSV, and import that CSV  
> > into an SQLite database. You can then use the SQLite database as Rails’  
> > database. For more information than that, you’d best ask on the Rails list.

With Ruport, one of our users did something like this:

```
    Table("my.csv", :records => true) do |s,r|
      YourModel.create(r.to_hash)
    end

```

Of course, YMMV and that’s a bit of a hack. Since this has come up a  
couple times, i wouldn’t mind adding a more general tool either as a  
Ruport plugin or in ruport-util, but I’ve not had a need for it, so  
I’d not be the one to write it 🙂
