Determine file formatSource:
Determine if files are xls or xlsx (or from the xlsx family).
excel_format(guess = TRUE) is used by
determine format. It draws on logic from two lower level functions:
format_from_ext()attempts to determine format from the file extension.
format_from_signature()consults the file signature or "magic number".
File extensions associated with xlsx vs. xls:
File signatures (in hexadecimal) for xlsx vs xls:
xlsx: First 4 bytes are
50 4B 03 04
xls: First 8 bytes are
D0 CF 11 E0 A1 B1 1A E1
Path to the xls/xlsx file.
Logical. If the file extension is absent or not recognized, this controls whether we attempt to guess format based on the file signature or "magic number".