Cannot import excel files (Subscripted assignment dimension mismatch. ERROR)

I am trying to import an Excel file, and keep being returned the below error.
??? Subscripted assignment dimension mismatch.
Error in ==> xlsfinfo at 80 indexes(i) = (strfind(class(sheet), 'Worksheet') > 0);
Error in ==> finfo at 94 [status, description] = xlsfinfo(filename);
Error in ==> uiimport>gatherFilePreviewData at 284 [type, unused, loadcmd, description] = ...
Error in ==> uiimport at 197 [ctorPreviewText, ctorHeaderLines, ctorDelim] = ...
This is a test sheet with very limited data (below), any suggestions or advice would be gratefully accepted???
Cost Type 1.2 1 2.4 1 3.1 2 1.5 2 1.1 2 1.4 1 6.5 1

댓글 수: 2

Could you please reformat your question with code format and include the code you are using?
I importing the data interactively, simply right clicking and import data from the current work directory. Does this help? The error im getting is as follows:
??? Subscripted assignment dimension mismatch.
Error in ==> xlsfinfo at 80 indexes(i) = (strfind(class(sheet), 'Worksheet') > 0);
Error in ==> finfo at 94 [status, description] = xlsfinfo(filename);
Error in ==> uiimport>gatherFilePreviewData at 284 [type, unused, loadcmd, description] = ...
Error in ==> uiimport at 197 [ctorPreviewText, ctorHeaderLines, ctorDelim] = ...

댓글을 달려면 로그인하십시오.

답변 (2개)

Try
which -all class
to determine whether you have accidentally introduced your own routine named "class"
mashor housh
mashor housh 2011년 11월 2일

0 개 추천

you can fix this problem by changing line 80 in xlsfinfo as follows: indexes(i) = (strfind(sheet.Type, 'Worksheet') > 0);
Good luck, Mashor Housh

카테고리

도움말 센터File Exchange에서 Data Import from MATLAB에 대해 자세히 알아보기

질문:

2011년 6월 24일

Community Treasure Hunt

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

Start Hunting!

Translated by