On MS Windows systems with Excel installed, it is possible to create an activexserver object to talk to excel in order to extract macro text or execute macros.
On non-Windows systems or MS Windows systems without Excel, or when 'basic' mode is specifically asked for, in order to read .xlsx files, a MATLAB routine xlsreadXLSX is called. The routine calls upon some java routines to extract portions of the .xlsx (because .xlsx are directories of .xml files that have been ZIP'd together) into text form. xml text form in hand, the MATLAB routine calls upon regexp() to parse the xml. Worst case, that code could be copied and hacked to know about formulae.
On non-Windows systems or MS Windows systems without Excel, or when 'basic' mode is specifically asked for, in order to read .xls files a MATLAB routine xlsreadBasic is called. It invokes the internal MATLAB routine biffread to do the binary read and discover the headers, but then it calls upon the built-in routine biffparse to turn the bytes into data. There is no configurability there. Handling macros would require writing or finding an xls parser. I seem to recall having encountered one in Java.
Best Answer