xlsread error: Invalid ConnectionPointContainer

2 visualizaciones (últimos 30 días)
Fontys
Fontys el 30 de Ag. de 2013
Hi, I want to import some data from Excel to Matlab. I use xlsread:
[ndata, text, alldata] = xlsread('Test.xlsx')
(as suggested on the Mathworks website: http://www.mathworks.de/de/help/matlab/ref/xlsread.html
The Excel file contains a 3x3 table: [1,2,3;4,5,6;7,8,9]
The error I encounter is:
>> [ndata, text, alldata] = xlsread('Test.xls')
Error using xlsread (line 247)
Error registering event(s), Invalid ConnectionPointContainer
I use WinXP, Matlab R2012b and Excel 2007. (the same error occurs when I use an .xlsx file)
Can anyone help me?
Thanks
  2 comentarios
Friedrich
Friedrich el 30 de Ag. de 2013
Can you run:
dbstop if caught error
before running xlsread. You should stop in the line which raises error. Which file and line is it?
Fontys
Fontys el 2 de Sept. de 2013
There you go:
dbstop if caught error
[ndata, text, alldata] = xlsread('Test.xls')
Caught-error breakpoint was hit in registerevent>addevent at line 148. The error was:
Error registering event(s), Invalid ConnectionPointContainer
148 list(m+1) = handle.listener(h, eventname, {@comeventcallback, eventhandler});
148 list(m+1) = handle.listener(h, eventname, {@comeventcallback, eventhandler});
The file is ..\toolbox\matlab\winfun\registerevent.m, line 148

Iniciar sesión para comentar.

Respuestas (1)

Geert
Geert el 30 de Ag. de 2013
Did you make sure that your current Matlab path is the same as the folder where 'Test.xlsx' is stored?
A save way of preventing this is issue is specifying the full path, for example:
>> [ndata, text, alldata] = xlsread('C:\Users\Fontys\Desktop\Test.xls')
Does this solve your problem?
  1 comentario
Fontys
Fontys el 30 de Ag. de 2013
Yes, I made sure of that. If I specify the whole filename it prompts the same error.
Thanks anyway.

Iniciar sesión para comentar.

Categorías

Más información sobre Data Import from MATLAB en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by