-
Notifications
You must be signed in to change notification settings - Fork 32
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
Read worksheets without formatting #50
Comments
Hello, My issue seems related to this one but a little bit different: when importing my spreadsheet, some of my datetimes are automatically converted in a wrong way, and I don't manage to reverse it after the import. The first column of my spreadsheet contains datetimes in UTC. The datetimes causing problems are initially these ones in the spreadsheet:
They correspond to the summer time change, but they are provided in UTC. After the Excel file import, these lines have been transformed into:
So the 2 original dates:
are transformed into:
I don't get the logic, and don't manage neither to reverse it by using Thanks a lot, |
Hello, |
hi @juliettefabre - yes, to reduce our effort here, could you please provide some more information, such as the versions of R, Excel, XLConnect and the actual code that you are executing that produces this behavior? Providing the output of |
Thanks, Yes here is the result of
The Excel files read by my script are based on templates that I previously generated with XLConnect, but actually the problem is the same if I import a really basic Excel file (test.xls) made with LibreOffice (Microsoft Excel 97-2003 format) with only one column and these values:
Then in R:
Juliette |
Ok thanks - so I can replicate this. The part that isn't clear to me though, is how can you specify the dates in Excel to be UTC? Because it's reading the times without any offset, so I'd say they're treated as CET/CEST to begin with, and then 2 or 2:30 are just kind of invalid and become 3 and 3:30. I can set the time-zone in R with e.g. Then, consequently, I get the below, which I think is correct logically speaking (I added two more timestamps at the bottom):
So in Switzerland I am +1 compared to UTC in winter, and in summer (DST) I am +2. |
Thanks a lot Roland, I'm so sorry, I just needed to add |
Hi,
When reading columns and converting to character - the formatting is used. This can lead to undesired inaccuracies. As this is the default behaviour, I wanted to request a switch when reading worksheet that leads to ignoring of all formats (even when type conversion from numeric to character is done).
Also - the help could more prominently note that when numeric values are coerced to character - this can lead to rounding issues.
Thanks!
The text was updated successfully, but these errors were encountered: