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

3 vues (au cours des 30 derniers jours)
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

Réponses (1)

Fangjun Jiang
Fangjun Jiang le 27 Juin 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 commentaires
Jonathan Bijman
Jonathan Bijman le 27 Juin 2019
I uninstalled MATLAB and I installed again, I did the same thing with microsoft office and it still appears the error.
please help!
Fangjun Jiang
Fangjun Jiang le 28 Juin 2019
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.

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by