There are many tutorials and guides regarding this topic. here, I am going to summarize all those. We will not go in depth but will have ready to work code.
For excel file upload, I am using Roo Gem. It’s wonderful and easy to learn code.
Here is the code : https://github.com/charusat09/upload_excel/blob/master/upload_excel.rb
For any queries please comment here. Please feel free to fork the branch and add new features to it. I would love to listen from you guys. Write to me @ firstname.lastname@example.org.