Check if XLS file is open and close it
Determine if Excel file is open. If it is open in MS Excel, it can be closed.
USAGE
isopen = xls_check_if_open(xlsfile)
isopen = xls_check_if_open(xlsfile,action)
INPUT
- XLSFILE: name of the Excel file
- ACTION: 'close' (closes file if it is open) or '' (do nothing). Option 'close' only works with MS Excel.
OUTPUT
- ISOPEN:
1 if XLSFILE is open
0 if XLSFILE is not open
10 if XLSFILE was closed
11 if XLSFILE is open and could not be closed
-1 if an error occurred
Zitieren als
Guilherme Coco Beltramini (2025). Check if XLS file is open and close it (https://www.mathworks.com/matlabcentral/fileexchange/41878-check-if-xls-file-is-open-and-close-it), MATLAB Central File Exchange. Abgerufen.
Kompatibilität der MATLAB-Version
Plattform-Kompatibilität
Windows macOS LinuxKategorien
Tags
Quellenangaben
Inspiriert: Run MS Excel macro, Delete worksheets in Excel file, Protect or unprotect worksheets in Excel file
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Live Editor erkunden
Erstellen Sie Skripte mit Code, Ausgabe und formatiertem Text in einem einzigen ausführbaren Dokument.
Version | Veröffentlicht | Versionshinweise | |
---|---|---|---|
1.1.0.0 | Changed input and output, and screenshot |
||
1.0.0.0 |