Error using xlswrite (line 226)

Hi I wanted to create an excel file by using 'xlswrite', cannot proceed as it is showing some kind of error which says, "Error using xlswrite (line 226) Invoke Error, Dispatch Exception: Source: Microsoft Excel Description: Microsoft Excel cannot access the file 'C:\Program Files\MATLAB\R2017b\bin\AF690720'. There are several possible reasons:
• The file name or path does not exist. • The file is being used by another program. • The workbook you are trying to save has the same name as a currently open workbook. Help File: xlmain11.chm Help Context ID: 0"
Please help me to find the solution. Thanks.

2 件のコメント

Rik
Rik 2018 年 8 月 1 日
It looks like Excel is trying to access a temporary file, but fails. Apart from the suggested solutions, I would suggest opening and closing Excel, making sure the indicated file is deleted, and running Matlab as an administrator.
OCDER
OCDER 2018 年 8 月 1 日
What is the file name? Can you show us the full inputs to your xlswrite?
disp(FileName) % = ?
disp(Data) % = ?
disp(Sheet) % = ?
disp(Range) % = ?
xlswrite(FileName, Data, Sheet, Range)

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

回答 (1 件)

Myraj
Myraj 2019 年 4 月 24 日

0 投票

Hi, if your office not activated must be do that, because I had this kind of problem and I solve it by ativating office. Good luck

タグ

質問済み:

2018 年 8 月 1 日

回答済み:

2019 年 4 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by