Jump to content

The ultimate community for Ruby on Rails developers.


Photo

Excel Importing

excel import import excel

  • Please log in to reply
1 reply to this topic

#1 ginajoseph

ginajoseph

    Passenger

  • Members
  • 1 posts

Posted 23 August 2013 - 04:01 PM

Hi everyone,

 

I'm new to ruby and need some guidance with a task. I have to import data from an excel spreadsheet. That currently works fine. Now I need to add new columns to the spreadsheet and those new columns belong to seperate tables in the database. So, first I need to look-up the foreign key of the value from excel and add it to that respective table. In total when the spreadsheet is imported I am dealing with three tables. How do I go about doing that? Thank you in advance for any guidance, help or examples.



#2 james

james

    Guard

  • Moderators
  • 221 posts
  • LocationLeeds, U.K.

Posted 29 August 2013 - 04:45 AM

Welcome to the forum and welcome to the land of Ruby.

 

 

In total when the spreadsheet is imported I am dealing with three tables. How do I go about doing that?

 

 

It's not very clear from your post what information you are lacking or whether you are talking about Ruby specifically or Ruby on Rails? or what versions you are working with.

 

Regardless of the above you will need to understand how relationships work in ActiveRecord::Base (which is a ruby class)

 

To get you started you might find the official guides a good starting point http://guides.rubyon...d_querying.html

 

This may well raise more questions than it answers but at least it might help you to formulate more specific questions that are easier to get answers to


Programming is just about problem solving!





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users