-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature request: use column names in col_types #415
Comments
col_types
I mostly consider this a subset of "Add column specification as in readr" #198. It would certainly be implied if readxl got a readr-like col spec. I'll leave this open for now, in case it's easy to implement this specific feature on a shorter timeframe. |
Improved col spec handling, here and in readr, is on the horizon now. So I seriously I doubt I will extend readxl's current |
For the time being, while readxl lacks improved column specification handling, it would be extremely useful if its parsing functions could output the column formats it applies when a file is parsed, much like read_csv does, for instance:
This would allow the user to:
I'm working with an Excel file with 58 columns and second @RobertMyles 's comment that it's quite challenging to put together and manage the appropriate col_types specification, given how this is currently handled in readxl--where I have to create from scratch a long string with each column's format. |
Would it be possible to use column names with
col_types
inread_excel()
? I have some Excel spreadsheets that have many columns, and that need to be formatted withcol_types
because of some badly formatted cells. It gets to a point where it's hard to keep track of what column is what type! For example, I have this snippet of code:It would be great to be able to use something like
col_types = c("Column1" = "text", "Column2" = "date")
, (withColumn1
the actual name of the first column).The text was updated successfully, but these errors were encountered: