Why do I get the error "Check that write permissions are available" using the command writetable?

Hi everyone!
Running the command writetable I got some issue:
writetable(Z,'Model.xlsx','Sheet',1)
Matlab says that some error occurs:
Error
Unable to save the workbook to file 'D:\Documents\MATLAB\Project\Model.xlsx'.
Check that write permissions are available, there is sufficient disk space, and the file can be written to or created.
Have you ever had the same problem? I'm a beginner with Matlab.

 採用された回答

Cris LaPierre
Cris LaPierre 2021 年 1 月 31 日
編集済み: Cris LaPierre 2021 年 1 月 31 日
The error suggests that MATLAB does not have write permission to the specified location.
You could try running MATLAB as an administrator. If that doesn't help, see this answer.

4 件のコメント

Diego Rago
Diego Rago 2021 年 2 月 1 日
Thank you so much!
Ismaeel
Ismaeel 2022 年 1 月 14 日
Thank you Cris for your comment. It worked when I use MATLAB as admin. However, when I try to use the function (writetable) inside a GUI app designer, it fails. The other option also did not work. I am using the latest version of MATLAB. Thanks for any help.
Cris LaPierre
Cris LaPierre 2022 年 1 月 14 日
Outside of MATLAB, can you copy a file, say from your desktop, and paste it to the same location you are wanting to write your table to?
Ismaeel
Ismaeel 2022 年 1 月 14 日
I have solved my problem following the note from Zeynab Mousavikhamene in the link:
I was trying to save my table inside a GUI that was built by App Designer using the 'writetable' function to (C:\Program Files\New Folder) and it did not work. I changed to C:\New_Folder (with no space) and it worked just fine.
Thanks

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeEnvironment and Settings についてさらに検索

製品

リリース

R2020b

質問済み:

2021 年 1 月 31 日

コメント済み:

2022 年 1 月 14 日

Community Treasure Hunt

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

Start Hunting!

Translated by