You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I understand why it was closed but I'd like to make the case for a 'text_as_shown' option for column types.
In many cases what is shown in excel is not the truth, so we're better off taking the actual value rather than what is shown.
In my case I have on one hand a lookup table in R that I don't create, which contains a column with "66.67%" stored as text (this column can also store actual text), and a value to look up, and on the other hand an excel file with this "66.67%" value typed by the user, expecting it to work with the lookup.
This will be read by read_excel() as "0.6....67" if I read it as text, and in order to to the lookup I have to do some awkward data wrangling.
Granted, I realise the design is not great, but I'm not responsible for it and this will be easily simplified if I could specify "text_as_shown" as a value to col_types, it would also be explicit enough so that I don't believe users would import wrong data by mistake more than they would without this option.
The text was updated successfully, but these errors were encountered:
Can you share an indicative .xlsx file? And what readxl can get vs. what you want.
I know you read #462, but I just want to emphasize that often what Excel shows is not actually present anywhere in the .xlsx file. Instead, what the user sees in a cell is created on-the-fly by the Excel application. So there's a real possibility that we (readxl) don't have access to what you want.
This is related to #462 (closed)
I understand why it was closed but I'd like to make the case for a 'text_as_shown' option for column types.
In many cases what is shown in excel is not the truth, so we're better off taking the actual value rather than what is shown.
In my case I have on one hand a lookup table in R that I don't create, which contains a column with "66.67%" stored as text (this column can also store actual text), and a value to look up, and on the other hand an excel file with this "66.67%" value typed by the user, expecting it to work with the lookup.
This will be read by read_excel() as "0.6....67" if I read it as text, and in order to to the lookup I have to do some awkward data wrangling.
Granted, I realise the design is not great, but I'm not responsible for it and this will be easily simplified if I could specify
"text_as_shown"
as a value tocol_types
, it would also be explicit enough so that I don't believe users would import wrong data by mistake more than they would without this option.The text was updated successfully, but these errors were encountered: