{"action":"created","comment":{"url":"https://api.github.com/repos/athityakumar/daru-io/pulls/comments/128280637","pull_request_review_id":50937625,"id":128280637,"diff_hunk":"@@ -0,0 +1,132 @@\n+require 'daru/io/importers/base'\n+\n+module Daru\n+  module IO\n+    module Importers\n+      class Excelx < Base\n+        # Imports a +Daru::DataFrame+ from a given XLSX file and sheet.\n+        #\n+        # @param path [String] Local / Remote path to XLSX file\n+        # @param sheet [String] Sheet name in the given XLSX file. Defaults to 0,\n+        #   to parse the dataframe from the first sheet.\n+        # @param skiprows [Integer] Skips the first +:skiprows+ number of rows from the\n+        #   sheet being parsed.\n+        # @param skipcols [Integer] Skips the first +:skipcols+ number of columns from the\n+        #   sheet being parsed.\n+        # @param order [Boolean] Defaults to true. When set to true, first row of the\n+        #   given sheet is used as the order of the Daru::DataFrame and data of\n+        #   the Dataframe consists of the remaining rows.\n+        # @param index [Boolean] Defaults to false. When set to true, first column of the\n+        #   given sheet is used as the index of the Daru::DataFrame and data of\n+        #   the Dataframe consists of the remaining columns.\n+        #\n+        #   When set to false, a default order (0 to n-1) is chosen for the DataFrame,\n+        #   and the data of the DataFrame consists of all rows in the sheet.\n+        #\n+        # @return A +Daru::DataFrame+ imported from the given XLSX file and sheet\n+        #\n+        # @example Importing from a local file\n+        #   path  = 'spec/fixtures/excelx/Stock-counts-sheet.xlsx'\n+        #   sheet = 'Example Stock Counts'\n+        #   df    = Daru::IO::Importers::XLSX.new(path, sheet: sheet).call\n+        #   df\n+        #\n+        #   #=> <Daru::DataFrame(15x7)>\n+        #              Status Stock coun  Item code        New Descriptio Stock coun Offset G/L\n+        #        0          H          1        nil        nil New stock  2014-08-01        nil\n+        #        1        nil          1  IND300654          2 New stock  2014-08-01      51035\n+        #        2        nil          1   IND43201          5 New stock  2014-08-01      51035\n+        #        3        nil          1   OUT30045          3 New stock  2014-08-01      51035\n+        #       ...       ...        ...     ...           ...     ...       ...           ...\n+        #\n+        # @example Importing from a local file without headers\n+        #   path  = 'spec/fixtures/excelx/Stock-counts-sheet.xlsx'\n+        #   sheet = 'Example Stock Counts'\n+        #   df    = Daru::IO::Importers::XLSX.new(path, sheet: sheet, headers: false).call\n+        #   df\n+        #\n+        #   #=> <Daru::DataFrame(16x7)>\n+        #                   0           1          2          3          4          5        6\n+        #        0      Status Stock coun  Item code        New Descriptio Stock coun Offset G/L\n+        #        1          H          1        nil        nil New stock  2014-08-01        nil\n+        #        2        nil          1  IND300654          2 New stock  2014-08-01      51035\n+        #        3        nil          1   IND43201          5 New stock  2014-08-01      51035\n+        #        4        nil          1   OUT30045          3 New stock  2014-08-01      51035\n+        #       ...       ...        ...     ...           ...     ...       ...           ...\n+        #\n+        # @example Importing from a remote URL\n+        #   path = 'https://www.exact.com/uk/images/downloads/getting-started-excel-sheets/Stock-counts-sheet.xlsx'\n+        #   sheet = 'Example Stock Counts'\n+        #   df    = Daru::IO::Importers::XLSX.new(path, sheet: sheet).call\n+        #   df\n+        #\n+        #   #=> <Daru::DataFrame(15x7)>\n+        #              Status Stock coun  Item code        New Descriptio Stock coun Offset G/L\n+        #        0          H          1        nil        nil New stock  2014-08-01        nil\n+        #        1        nil          1  IND300654          2 New stock  2014-08-01      51035\n+        #        2        nil          1   IND43201          5 New stock  2014-08-01      51035\n+        #        3        nil          1   OUT30045          3 New stock  2014-08-01      51035\n+        #       ...       ...        ...     ...           ...     ...       ...           ...\n+        def initialize(path, sheet: 0, order: true, index: false, skiprows: 0, skipcols: 0)\n+          optional_gem 'roo', '~> 2.7.0'","path":"lib/daru/io/importers/excelx.rb","position":71,"original_position":71,"commit_id":"d8781b4f12c05e5cd88dc5bc74c75d7d9724706d","original_commit_id":"d8781b4f12c05e5cd88dc5bc74c75d7d9724706d","user":{"login":"zverok","id":129656,"avatar_url":"https://avatars1.githubusercontent.com/u/129656?v=4","gravatar_id":"","url":"https://api.github.com/users/zverok","html_url":"https://github.com/zverok","followers_url":"https://api.github.com/users/zverok/followers","following_url":"https://api.github.com/users/zverok/following{/other_user}","gists_url":"https://api.github.com/users/zverok/gists{/gist_id}","starred_url":"https://api.github.com/users/zverok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zverok/subscriptions","organizations_url":"https://api.github.com/users/zverok/orgs","repos_url":"https://api.github.com/users/zverok/repos","events_url":"https://api.github.com/users/zverok/events{/privacy}","received_events_url":"https://api.github.com/users/zverok/received_events","type":"User","site_admin":false},"body":"In fact, this can be metaprogrammed. Like this:\r\n\r\n```ruby\r\nclass Excelx < Base\r\n  requires_gem 'roo', '~> 2.7.0' # says that on real creation of object the check should be done\r\n```\r\n\r\nAnother thought is you probably should not specify dependencies version so narrow for general-usage gem (which leads to idea of testing with multiple dependencies versions... So we should postpone this, just don't forget)","created_at":"2017-07-19T15:25:17Z","updated_at":"2017-07-19T15:27:24Z","html_url":"https://github.com/athityakumar/daru-io/pull/28#discussion_r128280637","pull_request_url":"https://api.github.com/repos/athityakumar/daru-io/pulls/28","_links":{"self":{"href":"https://api.github.com/repos/athityakumar/daru-io/pulls/comments/128280637"},"html":{"href":"https://github.com/athityakumar/daru-io/pull/28#discussion_r128280637"},"pull_request":{"href":"https://api.github.com/repos/athityakumar/daru-io/pulls/28"}}},"pull_request":{"url":"https://api.github.com/repos/athityakumar/daru-io/pulls/28","id":128760855,"html_url":"https://github.com/athityakumar/daru-io/pull/28","diff_url":"https://github.com/athityakumar/daru-io/pull/28.diff","patch_url":"https://github.com/athityakumar/daru-io/pull/28.patch","issue_url":"https://api.github.com/repos/athityakumar/daru-io/issues/28","number":28,"state":"open","locked":false,"title":"XLSX Importer","user":{"login":"athityakumar","id":17109060,"avatar_url":"https://avatars0.githubusercontent.com/u/17109060?v=4","gravatar_id":"","url":"https://api.github.com/users/athityakumar","html_url":"https://github.com/athityakumar","followers_url":"https://api.github.com/users/athityakumar/followers","following_url":"https://api.github.com/users/athityakumar/following{/other_user}","gists_url":"https://api.github.com/users/athityakumar/gists{/gist_id}","starred_url":"https://api.github.com/users/athityakumar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/athityakumar/subscriptions","organizations_url":"https://api.github.com/users/athityakumar/orgs","repos_url":"https://api.github.com/users/athityakumar/repos","events_url":"https://api.github.com/users/athityakumar/events{/privacy}","received_events_url":"https://api.github.com/users/athityakumar/received_events","type":"User","site_admin":false},"body":"Tests are yet to be beautified. Those changes are intended to be either here or, in PR #27 - depending on whichever PR is merged later.","created_at":"2017-07-04T09:26:12Z","updated_at":"2017-07-19T15:27:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"36761fea493d7b366228f22f5614c6ed0492ac59","assignee":null,"assignees":[],"requested_reviewers":[{"login":"lokeshh","id":7677524,"avatar_url":"https://avatars3.githubusercontent.com/u/7677524?v=4","gravatar_id":"","url":"https://api.github.com/users/lokeshh","html_url":"https://github.com/lokeshh","followers_url":"https://api.github.com/users/lokeshh/followers","following_url":"https://api.github.com/users/lokeshh/following{/other_user}","gists_url":"https://api.github.com/users/lokeshh/gists{/gist_id}","starred_url":"https://api.github.com/users/lokeshh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lokeshh/subscriptions","organizations_url":"https://api.github.com/users/lokeshh/orgs","repos_url":"https://api.github.com/users/lokeshh/repos","events_url":"https://api.github.com/users/lokeshh/events{/privacy}","received_events_url":"https://api.github.com/users/lokeshh/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/athityakumar/daru-io/milestones/2","html_url":"https://github.com/athityakumar/daru-io/milestone/2","labels_url":"https://api.github.com/repos/athityakumar/daru-io/milestones/2/labels","id":2549767,"number":2,"title":"GSoC 2017 : Second Evaluation","description":"","creator":{"login":"athityakumar","id":17109060,"avatar_url":"https://avatars0.githubusercontent.com/u/17109060?v=4","gravatar_id":"","url":"https://api.github.com/users/athityakumar","html_url":"https://github.com/athityakumar","followers_url":"https://api.github.com/users/athityakumar/followers","following_url":"https://api.github.com/users/athityakumar/following{/other_user}","gists_url":"https://api.github.com/users/athityakumar/gists{/gist_id}","starred_url":"https://api.github.com/users/athityakumar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/athityakumar/subscriptions","organizations_url":"https://api.github.com/users/athityakumar/orgs","repos_url":"https://api.github.com/users/athityakumar/repos","events_url":"https://api.github.com/users/athityakumar/events{/privacy}","received_events_url":"https://api.github.com/users/athityakumar/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":0,"state":"open","created_at":"2017-05-30T07:31:47Z","updated_at":"2017-07-19T02:49:25Z","due_on":"2017-07-28T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/athityakumar/daru-io/pulls/28/commits","review_comments_url":"https://api.github.com/repos/athityakumar/daru-io/pulls/28/comments","review_comment_url":"https://api.github.com/repos/athityakumar/daru-io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/athityakumar/daru-io/issues/28/comments","statuses_url":"https://api.github.com/repos/athityakumar/daru-io/statuses/d8781b4f12c05e5cd88dc5bc74c75d7d9724706d","head":{"label":"athityakumar:xlsx-importer","ref":"xlsx-importer","sha":"d8781b4f12c05e5cd88dc5bc74c75d7d9724706d","user":{"login":"athityakumar","id":17109060,"avatar_url":"https://avatars0.githubusercontent.com/u/17109060?v=4","gravatar_id":"","url":"https://api.github.com/users/athityakumar","html_url":"https://github.com/athityakumar","followers_url":"https://api.github.com/users/athityakumar/followers","following_url":"https://api.github.com/users/athityakumar/following{/other_user}","gists_url":"https://api.github.com/users/athityakumar/gists{/gist_id}","starred_url":"https://api.github.com/users/athityakumar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/athityakumar/subscriptions","organizations_url":"https://api.github.com/users/athityakumar/orgs","repos_url":"https://api.github.com/users/athityakumar/repos","events_url":"https://api.github.com/users/athityakumar/events{/privacy}","received_events_url":"https://api.github.com/users/athityakumar/received_events","type":"User","site_admin":false},"repo":{"id":92805130,"name":"daru-io","full_name":"athityakumar/daru-io","owner":{"login":"athityakumar","id":17109060,"avatar_url":"https://avatars0.githubusercontent.com/u/17109060?v=4","gravatar_id":"","url":"https://api.github.com/users/athityakumar","html_url":"https://github.com/athityakumar","followers_url":"https://api.github.com/users/athityakumar/followers","following_url":"https://api.github.com/users/athityakumar/following{/other_user}","gists_url":"https://api.github.com/users/athityakumar/gists{/gist_id}","starred_url":"https://api.github.com/users/athityakumar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/athityakumar/subscriptions","organizations_url":"https://api.github.com/users/athityakumar/orgs","repos_url":"https://api.github.com/users/athityakumar/repos","events_url":"https://api.github.com/users/athityakumar/events{/privacy}","received_events_url":"https://api.github.com/users/athityakumar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/athityakumar/daru-io","description":"daru-io is a plugin gem to the existing daru gem, which aims to add support to Importing DataFrames from / Exporting DataFrames to multiple formats.","fork":false,"url":"https://api.github.com/repos/athityakumar/daru-io","forks_url":"https://api.github.com/repos/athityakumar/daru-io/forks","keys_url":"https://api.github.com/repos/athityakumar/daru-io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/athityakumar/daru-io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/athityakumar/daru-io/teams","hooks_url":"https://api.github.com/repos/athityakumar/daru-io/hooks","issue_events_url":"https://api.github.com/repos/athityakumar/daru-io/issues/events{/number}","events_url":"https://api.github.com/repos/athityakumar/daru-io/events","assignees_url":"https://api.github.com/repos/athityakumar/daru-io/assignees{/user}","branches_url":"https://api.github.com/repos/athityakumar/daru-io/branches{/branch}","tags_url":"https://api.github.com/repos/athityakumar/daru-io/tags","blobs_url":"https://api.github.com/repos/athityakumar/daru-io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/athityakumar/daru-io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/athityakumar/daru-io/git/refs{/sha}","trees_url":"https://api.github.com/repos/athityakumar/daru-io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/athityakumar/daru-io/statuses/{sha}","languages_url":"https://api.github.com/repos/athityakumar/daru-io/languages","stargazers_url":"https://api.github.com/repos/athityakumar/daru-io/stargazers","contributors_url":"https://api.github.com/repos/athityakumar/daru-io/contributors","subscribers_url":"https://api.github.com/repos/athityakumar/daru-io/subscribers","subscription_url":"https://api.github.com/repos/athityakumar/daru-io/subscription","commits_url":"https://api.github.com/repos/athityakumar/daru-io/commits{/sha}","git_commits_url":"https://api.github.com/repos/athityakumar/daru-io/git/commits{/sha}","comments_url":"https://api.github.com/repos/athityakumar/daru-io/comments{/number}","issue_comment_url":"https://api.github.com/repos/athityakumar/daru-io/issues/comments{/number}","contents_url":"https://api.github.com/repos/athityakumar/daru-io/contents/{+path}","compare_url":"https://api.github.com/repos/athityakumar/daru-io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/athityakumar/daru-io/merges","archive_url":"https://api.github.com/repos/athityakumar/daru-io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/athityakumar/daru-io/downloads","issues_url":"https://api.github.com/repos/athityakumar/daru-io/issues{/number}","pulls_url":"https://api.github.com/repos/athityakumar/daru-io/pulls{/number}","milestones_url":"https://api.github.com/repos/athityakumar/daru-io/milestones{/number}","notifications_url":"https://api.github.com/repos/athityakumar/daru-io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/athityakumar/daru-io/labels{/name}","releases_url":"https://api.github.com/repos/athityakumar/daru-io/releases{/id}","deployments_url":"https://api.github.com/repos/athityakumar/daru-io/deployments","created_at":"2017-05-30T06:39:04Z","updated_at":"2017-06-19T04:17:02Z","pushed_at":"2017-07-19T02:49:25Z","git_url":"git://github.com/athityakumar/daru-io.git","ssh_url":"git@github.com:athityakumar/daru-io.git","clone_url":"https://github.com/athityakumar/daru-io.git","svn_url":"https://github.com/athityakumar/daru-io","homepage":"http://www.rubydoc.info/github/athityakumar/daru-io/master/","size":2186,"stargazers_count":3,"watchers_count":3,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":25,"forks":1,"open_issues":25,"watchers":3,"default_branch":"master"}},"base":{"label":"athityakumar:master","ref":"master","sha":"08f2fd8d2411021485983bcb9426e431fa944567","user":{"login":"athityakumar","id":17109060,"avatar_url":"https://avatars0.githubusercontent.com/u/17109060?v=4","gravatar_id":"","url":"https://api.github.com/users/athityakumar","html_url":"https://github.com/athityakumar","followers_url":"https://api.github.com/users/athityakumar/followers","following_url":"https://api.github.com/users/athityakumar/following{/other_user}","gists_url":"https://api.github.com/users/athityakumar/gists{/gist_id}","starred_url":"https://api.github.com/users/athityakumar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/athityakumar/subscriptions","organizations_url":"https://api.github.com/users/athityakumar/orgs","repos_url":"https://api.github.com/users/athityakumar/repos","events_url":"https://api.github.com/users/athityakumar/events{/privacy}","received_events_url":"https://api.github.com/users/athityakumar/received_events","type":"User","site_admin":false},"repo":{"id":92805130,"name":"daru-io","full_name":"athityakumar/daru-io","owner":{"login":"athityakumar","id":17109060,"avatar_url":"https://avatars0.githubusercontent.com/u/17109060?v=4","gravatar_id":"","url":"https://api.github.com/users/athityakumar","html_url":"https://github.com/athityakumar","followers_url":"https://api.github.com/users/athityakumar/followers","following_url":"https://api.github.com/users/athityakumar/following{/other_user}","gists_url":"https://api.github.com/users/athityakumar/gists{/gist_id}","starred_url":"https://api.github.com/users/athityakumar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/athityakumar/subscriptions","organizations_url":"https://api.github.com/users/athityakumar/orgs","repos_url":"https://api.github.com/users/athityakumar/repos","events_url":"https://api.github.com/users/athityakumar/events{/privacy}","received_events_url":"https://api.github.com/users/athityakumar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/athityakumar/daru-io","description":"daru-io is a plugin gem to the existing daru gem, which aims to add support to Importing DataFrames from / Exporting DataFrames to multiple formats.","fork":false,"url":"https://api.github.com/repos/athityakumar/daru-io","forks_url":"https://api.github.com/repos/athityakumar/daru-io/forks","keys_url":"https://api.github.com/repos/athityakumar/daru-io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/athityakumar/daru-io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/athityakumar/daru-io/teams","hooks_url":"https://api.github.com/repos/athityakumar/daru-io/hooks","issue_events_url":"https://api.github.com/repos/athityakumar/daru-io/issues/events{/number}","events_url":"https://api.github.com/repos/athityakumar/daru-io/events","assignees_url":"https://api.github.com/repos/athityakumar/daru-io/assignees{/user}","branches_url":"https://api.github.com/repos/athityakumar/daru-io/branches{/branch}","tags_url":"https://api.github.com/repos/athityakumar/daru-io/tags","blobs_url":"https://api.github.com/repos/athityakumar/daru-io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/athityakumar/daru-io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/athityakumar/daru-io/git/refs{/sha}","trees_url":"https://api.github.com/repos/athityakumar/daru-io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/athityakumar/daru-io/statuses/{sha}","languages_url":"https://api.github.com/repos/athityakumar/daru-io/languages","stargazers_url":"https://api.github.com/repos/athityakumar/daru-io/stargazers","contributors_url":"https://api.github.com/repos/athityakumar/daru-io/contributors","subscribers_url":"https://api.github.com/repos/athityakumar/daru-io/subscribers","subscription_url":"https://api.github.com/repos/athityakumar/daru-io/subscription","commits_url":"https://api.github.com/repos/athityakumar/daru-io/commits{/sha}","git_commits_url":"https://api.github.com/repos/athityakumar/daru-io/git/commits{/sha}","comments_url":"https://api.github.com/repos/athityakumar/daru-io/comments{/number}","issue_comment_url":"https://api.github.com/repos/athityakumar/daru-io/issues/comments{/number}","contents_url":"https://api.github.com/repos/athityakumar/daru-io/contents/{+path}","compare_url":"https://api.github.com/repos/athityakumar/daru-io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/athityakumar/daru-io/merges","archive_url":"https://api.github.com/repos/athityakumar/daru-io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/athityakumar/daru-io/downloads","issues_url":"https://api.github.com/repos/athityakumar/daru-io/issues{/number}","pulls_url":"https://api.github.com/repos/athityakumar/daru-io/pulls{/number}","milestones_url":"https://api.github.com/repos/athityakumar/daru-io/milestones{/number}","notifications_url":"https://api.github.com/repos/athityakumar/daru-io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/athityakumar/daru-io/labels{/name}","releases_url":"https://api.github.com/repos/athityakumar/daru-io/releases{/id}","deployments_url":"https://api.github.com/repos/athityakumar/daru-io/deployments","created_at":"2017-05-30T06:39:04Z","updated_at":"2017-06-19T04:17:02Z","pushed_at":"2017-07-19T02:49:25Z","git_url":"git://github.com/athityakumar/daru-io.git","ssh_url":"git@github.com:athityakumar/daru-io.git","clone_url":"https://github.com/athityakumar/daru-io.git","svn_url":"https://github.com/athityakumar/daru-io","homepage":"http://www.rubydoc.info/github/athityakumar/daru-io/master/","size":2186,"stargazers_count":3,"watchers_count":3,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":25,"forks":1,"open_issues":25,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/athityakumar/daru-io/pulls/28"},"html":{"href":"https://github.com/athityakumar/daru-io/pull/28"},"issue":{"href":"https://api.github.com/repos/athityakumar/daru-io/issues/28"},"comments":{"href":"https://api.github.com/repos/athityakumar/daru-io/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/athityakumar/daru-io/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/athityakumar/daru-io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/athityakumar/daru-io/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/athityakumar/daru-io/statuses/d8781b4f12c05e5cd88dc5bc74c75d7d9724706d"}}}}
{"actor":{"display_login":"zverok"}}