Check if Excel File is open

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!

 채택된 답변

Kaustubha Govind
Kaustubha Govind 2011년 4월 7일

0 개 추천

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.

추가 답변 (1개)

Paulo Silva
Paulo Silva 2011년 4월 7일

1 개 추천

FListOpen=fopen('all'); %get the names of the open files
ismember('myfile',FListOpen) %see if myfile is open

카테고리

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by