Info

This question is closed. Reopen it to edit or answer.

2014a Problem with "which" function, impacting xlsread and dir

1 view (last 30 days)
I recently upgraded to R2014a and have run into a few problems accessing certain files. If I try to use xlsread on a group of 10 .xlsx files in a particular folder, 9 work and 1 fails. It happens to be the largest file. I think the error is occurring with the "which" function, which reports that the file is not found. Odd observations: - If my current directory is set to the directory containing the file, it loads fine. (Not necessary for the other 9 files) - If I open the problematic .xlsx file, save it, and then load, it loads without a problem. If I try to use xlsread the following day (on something re-saved the previous day), xlsread fails.
I just experienced the same sort of error with the dir function trying to load a large .mat file. which.m says the file isn't found (but the exist.m function returns 1)
I'm running Windows 7 on a 64bit machine.
Anyone have a similar experience or ideas on how to make these functions work?
Thanks,
Josh
  1 Comment
Geoff Hayes
Geoff Hayes on 27 Aug 2014
Joshua - you state that I think the error is occurring with the "which" function, which reports that the file is not found. What makes you think that? Are you using the which function in your code? Can you show us what code that you have written?
You say that the 9 work and 1 fails. What is the failure due to? Is there an error message and, if so, what is it?
Also, please include the name of this tenth file that fails unless you are in the directory containing that file.
I'd suggest making sure that your folder (with files) is included in the MATLAB search path, but it must be else you wouldn't be able to read in the other nine files.
As for, I just experienced the same sort of error with the dir function trying to load a large .mat file. which.m says the file isn't found (but the exist.m function returns 1). What do you mean by loading the file with dir? Also, if exist returns a one that suggests (according to the link) that the name is a variable in the workspace.
Please include the lines of code that you are using to load or check on that mat file.

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!