Embedded systems cannot use .mex files or excel. Video functions such as getting video frames are also not supported (unless perhaps under Simulink.)
Basically, anything that cannot be done in standard C without extensions is not supported for code generation from MATLAB.
You can go beyond that by providing your own external routines that access hardware-specific features. If the manufacturer of your hardware has supplied libraries to access hardware without operating system support, then you can use those libraries.