Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow user to handle Excel's autoformatting of dates #262
Excel has aggressive auto-formatting that the user may not have noticed when inputting data. Currently readxl coerces date cells into the raw number used by excel, but usually what I want is the formatted string, as it appears in Excel.
I think that a column with rows that have types that cannot be automatically coerced is a unique to Excel worksheets because of Excel's aggressive auto-formatting. The other tidyverse packages for data import don't have to deal with it, because none of them import data with types that can change across rows (readr doesn't receive type information from the file and haven/feather always receive the same type for a column).
#256 implemented a solution that imported the column as a list type which preserved the type information.
I can also imagine adding a formatting parameter that would give the user control over how a date is formatted when a character column encounters it. I think this would be less flexible, but may make more sense in readxl.
I'm happy to rebase #256 if you are interested, take a stab at implementing the formatting argument, or leave it alone.