Error message= Collums 1 through 2
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Axel Sellert
le 5 Juin 2017
Commenté : Amelie
le 5 Juil 2024
Hi, I am using Matlab on a library computer at my Uni where they have version R2016a. Whenever I am trying to read in my excel workbook for a path using xlsread I receive an error message saying
ErrorMessage =
Columns 1 through 2
'This package uses the Matlab command xlsread to read from Excel files.' 'This command appeared for the first time in Matlab 6. Your version of Matlab is older than version 6.'
Column 3
'You must modify the file DSGEReadExcel.m or BVARReadExcel.m to read in data etc in some other way. Or upgrade Matlab ...'
This is strange since it is version 9.0 ie R2016a
Could anyone please help?
0 commentaires
Réponse acceptée
Arnav Mendiratta
le 13 Juin 2017
I reckon you have installed some third party packages which are shadowing the "xlsread" function. Execute the following command to see if the function is shadowed:
which -all xlsread
The output should look like:
C:\Program Files\MATLAB\R2017a\toolbox\matlab\iofun\xlsread.m
If you have different output, you would need to rename the shadowed function. Alternatively, you can restore the MATLAB path using:
restoredefaultpath
rehash toolboxcache
This will remove all the third party toolboxes and support packages. If you would like to save this default configuration, use:
savepath
2 commentaires
Amelie
le 5 Juil 2024
Unfortunately, I have the same problem and get the exact same error message...
When I enter
which -all xlsread
in the command window, I get:
/Applications/MATLAB_R2023b.app/toolbox/matlab/iofun/xlsread.m
When I enter
restoredefaultpath
rehash toolboxcache
in the command window and run the main file, I get error messages regarding the path, since DSGEReadExel.m among other .m files are in another folder. But even when I copy/paste the files in the same folder where the main file is stored, I still get the same error message, that is:
'This package uses the Matlab command xlsread to read from Excel files. This command appeared for the first time in Matlab 6. Your version of Matlab is older than version 6. You must modify the file DSGEReadExcel.m to read in data etc in some other way. Or upgrade Matlab ...').
Although it seems that Matlab has access to the .xls file and store the information and values from the .xls file in the Workspace.
Can someone tell me, how I can solve the problem and what I have to do ?
Many thanks for your help!
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Data Import from MATLAB dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!