{"action":"created","issue":{"url":"https://api.github.com/repos/continuum/active_importer/issues/30","labels_url":"https://api.github.com/repos/continuum/active_importer/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/continuum/active_importer/issues/30/comments","events_url":"https://api.github.com/repos/continuum/active_importer/issues/30/events","html_url":"https://github.com/continuum/active_importer/issues/30","id":55182226,"number":30,"title":"Import multiple .xls sheets","user":{"login":"terrainoob","id":72852,"avatar_url":"https://avatars.githubusercontent.com/u/72852?v=3","gravatar_id":"","url":"https://api.github.com/users/terrainoob","html_url":"https://github.com/terrainoob","followers_url":"https://api.github.com/users/terrainoob/followers","following_url":"https://api.github.com/users/terrainoob/following{/other_user}","gists_url":"https://api.github.com/users/terrainoob/gists{/gist_id}","starred_url":"https://api.github.com/users/terrainoob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terrainoob/subscriptions","organizations_url":"https://api.github.com/users/terrainoob/orgs","repos_url":"https://api.github.com/users/terrainoob/repos","events_url":"https://api.github.com/users/terrainoob/events{/privacy}","received_events_url":"https://api.github.com/users/terrainoob/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-01-22T17:23:13Z","updated_at":"2015-01-29T19:42:18Z","closed_at":null,"body":"The gem is working great in my project so far, but I'm looking at ways to improve workflow for the end user.  It would be great if they could import multiple model sets just by having them in separate sheets rather than having to have separate files for each model.  The situation I have is that we allow the user to import a List (model) with it's ListItems (each belongs_to List) as rows in a spreadsheet.  But if the user wants to import multiple Lists, they currently have to create a separate .xls file for each one and import them one at a time.  (It would also be great to be able to read the tab names and assign the List.name from the tab name).\r\n\r\nI saw that I can specify a particular sheet to import, but I can't figure out a way to loop through each sheet in a workbook and import each one in turn.  Is this something that's possible?  Or is there perhaps a better approach to this?"},"comment":{"url":"https://api.github.com/repos/continuum/active_importer/issues/comments/72090313","html_url":"https://github.com/continuum/active_importer/issues/30#issuecomment-72090313","issue_url":"https://api.github.com/repos/continuum/active_importer/issues/30","id":72090313,"user":{"login":"terrainoob","id":72852,"avatar_url":"https://avatars.githubusercontent.com/u/72852?v=3","gravatar_id":"","url":"https://api.github.com/users/terrainoob","html_url":"https://github.com/terrainoob","followers_url":"https://api.github.com/users/terrainoob/followers","following_url":"https://api.github.com/users/terrainoob/following{/other_user}","gists_url":"https://api.github.com/users/terrainoob/gists{/gist_id}","starred_url":"https://api.github.com/users/terrainoob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terrainoob/subscriptions","organizations_url":"https://api.github.com/users/terrainoob/orgs","repos_url":"https://api.github.com/users/terrainoob/repos","events_url":"https://api.github.com/users/terrainoob/events{/privacy}","received_events_url":"https://api.github.com/users/terrainoob/received_events","type":"User","site_admin":false},"created_at":"2015-01-29T19:42:17Z","updated_at":"2015-01-29T19:42:17Z","body":"Yes.  All of the pages would contain the same data structure.  The use case is as follows:\r\n\r\nEach tab contains a List (named by the tab) with each row being a ListItem that belongs_to that List.\r\n\r\nIf I want to be able to import 6 lists, it would be far easier to create 6 tabs in an Excel file and run one import, rather than creating 6 different Excel sheets and running 6 different imports.\r\n\r\nSo my thinking is if there could be a switch that would turn on an outer loop that just enumerated each tab and then looped through and imported each tab (as it does now), that would solve my issue.\r\n\r\nAs an aside, if I was able to get an enumerated list of tabs and present them to the user to let them select which tabs to import, that would be the most super awesome thing ever!\r\n\r\nIf you need more info or want to bounce ideas around, I'm certainly happy to help brainstorm.  If I get some free time soon (I'm in a project crunch atm) I'll try take a look at the code and see if I can make some suggestions about how I might approach such a feature.  Happy to help any way I can, as this gem has saved me immense amounts of time and headache!  :)"}}