MATLAB Answers

0

why does appear this error: "Unable to open file 'C:\Users\​jonat\Desk​top\Clean\​~$2019-04-​26 Clean.xlsx'?

Asked by Jonathan Bijman on 27 Jun 2019
Latest activity Commented on by Fangjun Jiang on 28 Jun 2019
Hello everyone
I have a command that allows to read excel files, and when I apply run, appears an error that I don't get why appears:
Error using readtable (line 216)
Unable to open file 'C:\Users\jonat\Desktop\Clean\~$2019-04-26 Clean.xlsx' as a workbook. Check that the
file exists, read access is available, and the file is a valid spreadsheet file.
Error in Voc_Ambos (line 12)
thistable = readtable(thisfile);
Even when I take out the file 2019-04-26 Clean.xlsx from the folder "Clean", still appears this error.
What can I do?
Please help
Thank u

  0 Comments

Sign in to comment.

1 Answer

Answer by Fangjun Jiang on 27 Jun 2019

The name "~$2019-04-26 Clean.xlsx" indicates it is a temporary file. Is the file opened or edited by another program or by the code prioir to this line? Just make sure there is no conflicting access to this file and run readtable() alone to try it out.

  4 Comments

Show 1 older comment
close MATLAB, delete the temporary file (if it re-appears), re-start MATLAB.
I uninstalled MATLAB and I installed again, I did the same thing with microsoft office and it still appears the error.
please help!
It might have nothing to do with MATLAB. dinfo indicates that "~$2019-04-26 Clean.xlsx" is in the list.
  1. Might it be that "~$2019-04-26 Clean.xlsx" is hidden in your folder?
  2. Might it be that "2019-04-26 Clean.xlsx" file contain some macros that opening or reading it caused the temporary file? Remove "2019-04-26 Clean.xlsx" from the folder and try it again.

Sign in to comment.