I have a Perl script that reads data from an Excel binary ( xls ) file. But the client who sends us these files started sending us XLSX files from time to time. I updated the script to read them. However, the client sometimes likes to name XLSX files with the .xls extension, which currently confuses the heck outta my script, because it uses the file name to determine what type of file it is.
An XLSX file is a zip file containing XML material. Is there an easy way for my script to look at the file and indicate if it is a zip file or not? If so, I can make my script available, and not just the file name.
perl excel file-format zip
Davekub
source share