MATLAB: Problem accessing Excel files through xlsread

excelimporting excel dataopenexcelworkbookxlsread

Hi everyone, I'm trying to open Excel files via MATLAB using xlsread, and this is what I get:
data = xlsread('..\10 Power Curve Test\04 AEP\AEP calculations T94 T107 T149 - Final.xls',16,'C8:F51');
Error using xlsread (line 249)
Error: The server threw an exception.
I've dug down into the code and found the problem line, in OpenExcelWorkbook:
Excel.workbooks.Open(filename, 0, readOnly);
Excel is a COM.Excel_Application object.
When trying to run this line independently of the larger function, I get the following error message:
Error using Interface.000208DB_0000_0000_C000_000000000046/Open
Invoke Error, Dispatch Exception:
Source: Microsoft Excel
Description: Sorry, we couldn't find ..\10 Power Curve Test\04 AEP\AEP calculations T94 T107 T149 - Final.xlsx. Is it possible it
was moved, renamed or deleted?
Help File: xlmain11.chm
Help Context ID: 0
However, I know that the file exists, because I can open it with fopen:
fopen('..\10 Power Curve Test\04 AEP\AEP calculations T94 T107 T149 - Final.xlsx')
ans =
3
I've also tried using xlsread with other files, from within the working directory, and the same problem persists.
Can anyone help me with this? My only idea at this point is to force a Windows update and look for updates to Office and hope that fixes something.
Thanks in advance!

Best Answer

1- open the excel> file, >option, >add in, manage then select COM ADD IN, and clear everything (unchecked). everything should be cleared (unchecked). 2- restart the PC, and open the matlab. 3- perform xlsread command.
PS. For those people who use foxit pdf reader, it is potential to face this problem, so follow mentioned order.
Related Question