I have an excel file where the following warning message appears when I want to open it:
The file you are trying to open, 'name.ext', is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?
When I click yes to open it, everything is fine. However, I want to read this file in R and couldn't manage that R loads the content despite the warning. How can I achieve this?
One example of the files I want to open with R can be downloaded here. I use MS Office 2016.
This is an XML file with a UTF-16 BOM (byte order mark) at the beginning. You can read it with R:
You can just use the
xml2
package (andread_xml
) if you really want to bash your head against the wall repeatedly to deal with the crazy XML namespaces in these Microsoft documents.You'll still need to do date/time conversion and numeric conversion.