Run MS Excel macro

Run MS Excel macro with or without parameters

You are now following this Submission

Run MS Excel macro

USAGE
xls_run_macro(xlsfile,macro)
xls_run_macro(xlsfile,macro,params)

INPUT
- XLSFILE: name of the XLS-file
- MACRO: macro name
- PARAMS: parameters for the MACRO

OUTPUT
- XLSFILE will be edited

N.B.
- In some cases when an error occurs, MS Excel must be manually closed (in Task Manager for Windows systems)
- Some macros do not run if the visibility of MS Excel is off. So it is on by default.

Cite As

Guilherme Coco Beltramini (2026). Run MS Excel macro (https://www.mathworks.com/matlabcentral/fileexchange/42063-run-ms-excel-macro), MATLAB Central File Exchange. Retrieved .

Acknowledgements

Inspired by: Check if XLS file is open and close it

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0