Page 1 of 1

Excel content?

PostPosted: Fri Jun 19, 2015 3:41 pm
by aaljr
Can Hazel rename an Excel file (.xls/.xlsx) based on content within the Excel file?

I receive Excel files that are cryptically named, but the content of the file includes detail like companyname and date. Can I get at that info in the file? mdls doesn't contain any of the data, and mdimport -d2 doesn't either.

If the rule 'Contents' 'contain match' is only for text files, do you know of a way to go about searching an .xls/.xlsx file via a shell script?

Terms I'd search for might be "company abc" or the pattern "mm/dd/yyyy".

Thanks

Re: Excel content?

PostPosted: Mon Jun 22, 2015 11:31 am
by Mr_Noodle
As you've figured out, the normal mechanisms won't work as Excel files aren't text files. I don't know of a third party program off-hand but search around. The alternative would be to convert them to something like csv.