Error using .xlsread
8 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
EDIT: adding picture here
Dear All,
I am reading data into my MATLAB code throguh several .xls files; occassionally, I am running into the error, 'Error using xlsread'. Could someone please help me understand the source of this error and help fix it.
Thanks in advnace!
Regards,
5 Commenti
dpb
il 1 Nov 2023
Well, that's a painful way for respondents/volunteers here to have to try to search out what went wrong, @Kareemulla Dudekula. At a barest of minimums attach the text of the error (all the red text) in context with the code you ran that generated the error.
It's likely no real solution will be possible without the actual spreadsheet to test with; attach it instead of the one you did.
Risposte (1)
Yash
il 2 Gen 2024
Hi Kareemulla,
I understand you are facing issues while using the "xlsread" function. As per the MATLAB documentation, "xlsread" is deprecated and is not recommended. You should use "readtable", "readmatrix", or "readcell" instead.
If, due to some reasons, you need to use "xlsread" function only, then consider the following points:
The error that you are facing is caused by excel, whis might be due to a variety of reasons. It is not possible to determine the exact reason without the actual spreadsheet. You can try these troubleshooting steps:
- Restart MATLAB: This works in most of the cases. The problem often resolves after a fresh restart.
- Check File Name Length: The character limit on the length of a filename in Excel (folder + base file name) is limited to 218 characters. ensure that it is shorter than that.
- Protected Mode in Excel: If the file is opened in the protected mode, make sure you enable editing and disable the protected mode.
- Network directory: If the file is present in a network(shared) folder, there might be a chance that many users are accessing the same file simultaneously. Try to copy that on your local disk and run again.
You can also seek help from the following MATLAB Answer:
I hope these suggestions help you address your query.
0 Commenti
Vedere anche
Categorie
Scopri di più su Spreadsheets in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!