Why does this issue with XLSWRITE occurs?

조회 수: 16 (최근 30일)
Tony Castillo
Tony Castillo 2019년 11월 6일
댓글: Bob Thompson 2019년 11월 7일
Dear all,
I had gotten this error message the odd in it is that previously it worked properly, but after some usage it is not working any longer:
Error using xlswrite (line 224)
The file
C:\Users\Tony\Documents\MATLAB\NewRoad2DC_Ok\7_PVandBatt_Exchanges\1_Home_Simplified_Weight_Exchange\HOUSE_REAL.xlsx
is not writable. It might be locked by another process.
Error in Ana_WE_home_v2 (line 98)
xlswrite('HOUSE_REAL.xlsx',Vector,sheet,'b2:b20')
  댓글 수: 3
Tony Castillo
Tony Castillo 2019년 11월 7일
Thank you so much, I do not know what happened because it just worked only after restarting the PC, I mean I think you were completely right in your point, although other algorithms worked properly only this one not.
Bob Thompson
Bob Thompson 2019년 11월 7일
xlswrite requires the ability for Matlab to be able to open, edit, and close an excel file. As with any MS Office application, if the file is already open then it is locked for editing by a second access attempt, and the Matlab command balks at this. I have learned that there are often processes still holding files 'open' even if their windows aren't visible. Restarting the PC forces those processes to close the applications, which is what allows it to start working again.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by