次のコードを実行すると
function feff
filename = 'UHL DEA.xlsx';
FI = xlsread(filename,'AU9:AU179');
FO = xlsread(filename,'AW9:AW179');
FEff = FI./FO;
%Write the efficiency back to the appropriate file in excel
xlswrite(filename,FEff,'BC9:BC179');
エラーが発生します
Error using xlswrite (line 220)
Excel returned: Error: Object returned error code: 0x800A03EC.
Error in feff (line 15)
xlswrite(filename,FEff,'BC9:BC179');
しかし、次のように別のファイルに書き込むと正常に動作します
function feff
filename = 'UHL DEA.xlsx';
FI = xlsread(filename,'AU9:AU179');
FO = xlsread(filename,'AW9:AW179');
FEff = FI./FO;
%Write the efficiency back to the appropriate file in excel
xlswrite('DEA.xlsx',FEff,'BC9:BC179');
UHL DEA.xlsx には、前の列に他のデータが含まれているため、このデータを同じファイルに再度書き込む必要があります。ポインタをいただければ幸いです。ありがとう