0

When I run the following code

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');

I get the error

 Error using xlswrite (line 220)
 Excel returned: Error: Object returned error code: 0x800A03EC.

 Error in feff (line 15)
 xlswrite(filename,FEff,'BC9:BC179');

But it works fine if i write into another file as follows

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'); 

The UHL DEA.xlsx contains other data in the previous columns and I need to write this data again in the same file. Pointers will be appreciated. Thanks

Lipika Deka
  • 3,386
  • 6
  • 40
  • 54

1 Answers1

0

Are you using a backward compatible xls file? HRESULT: 0x800A03EC on Worksheet.range

Check the accepted answer.

Edit: If this is not it, what happens if you try to edit the entire range without using matlab?

Community
  • 1
  • 1
Dennis Jaheruddin
  • 19,745
  • 7
  • 58
  • 100