MATLAB: Check if Excel File is open

excelfile

I am doing a read/write to an excel file. In order to do the write, I want to check if the file is already open somewhere else in case I need to close it. How can I do this?
Thank you!

Best Answer

I think fopen('all') only lists the files that were previously opened using fopen (not if the file was opened by another program). Tech Solution #1-954SDY should be what you need.