{"action":"created","issue":{"url":"https://api.github.com/repos/hadley/readxl/issues/135","repository_url":"https://api.github.com/repos/hadley/readxl","labels_url":"https://api.github.com/repos/hadley/readxl/issues/135/labels{/name}","comments_url":"https://api.github.com/repos/hadley/readxl/issues/135/comments","events_url":"https://api.github.com/repos/hadley/readxl/issues/135/events","html_url":"https://github.com/hadley/readxl/issues/135","id":110827539,"number":135,"title":"more values for col_types like readr::col_datetime()","user":{"login":"shrektan","id":8368933,"avatar_url":"https://avatars.githubusercontent.com/u/8368933?v=3","gravatar_id":"","url":"https://api.github.com/users/shrektan","html_url":"https://github.com/shrektan","followers_url":"https://api.github.com/users/shrektan/followers","following_url":"https://api.github.com/users/shrektan/following{/other_user}","gists_url":"https://api.github.com/users/shrektan/gists{/gist_id}","starred_url":"https://api.github.com/users/shrektan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shrektan/subscriptions","organizations_url":"https://api.github.com/users/shrektan/orgs","repos_url":"https://api.github.com/users/shrektan/repos","events_url":"https://api.github.com/users/shrektan/events{/privacy}","received_events_url":"https://api.github.com/users/shrektan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-11T01:28:42Z","updated_at":"2016-02-24T21:06:47Z","closed_at":null,"body":"Hi, @hadley. I'm wondering why the `readxl::col_types` doesn't have the same possible values like `readr::col_types`, like `col_datetime()`. I think that's really a cool and useful feature. Is it in the plan of future implementing?\r\n\r\nThanks."},"comment":{"url":"https://api.github.com/repos/hadley/readxl/issues/comments/188453009","html_url":"https://github.com/hadley/readxl/issues/135#issuecomment-188453009","issue_url":"https://api.github.com/repos/hadley/readxl/issues/135","id":188453009,"user":{"login":"drolejoel","id":7417808,"avatar_url":"https://avatars.githubusercontent.com/u/7417808?v=3","gravatar_id":"","url":"https://api.github.com/users/drolejoel","html_url":"https://github.com/drolejoel","followers_url":"https://api.github.com/users/drolejoel/followers","following_url":"https://api.github.com/users/drolejoel/following{/other_user}","gists_url":"https://api.github.com/users/drolejoel/gists{/gist_id}","starred_url":"https://api.github.com/users/drolejoel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drolejoel/subscriptions","organizations_url":"https://api.github.com/users/drolejoel/orgs","repos_url":"https://api.github.com/users/drolejoel/repos","events_url":"https://api.github.com/users/drolejoel/events{/privacy}","received_events_url":"https://api.github.com/users/drolejoel/received_events","type":"User","site_admin":false},"created_at":"2016-02-24T21:06:47Z","updated_at":"2016-02-24T21:06:47Z","body":"Where `readxl::read_excel()` falls down consistently is to guess when the data.frame is sparse e.g., the first 10000 rows are blank. Thus even reading the first 9000 rows won't be able to help discern what the column type should be. Here's a suggestion: perhaps better way is for `readxl::read_excel()` proceed column-by-column as follows: i) sort descending and then ii) read the first N rows.  These first N rows are likely to contain data and it will be easier to tell the type. This really only needs to be done for columns in which the current algorithm has blanks in the Excel file. While this technique is slower, I'm sure it'll be faster than having to manually construct a `col_types` vector, so it might be a good optional argument.  GO HADLEYVERSE!"}}