Error using readtable (line 318) Error when I Try to Read in a .dat File

Hi! I am using this code: filename=uigetfile('.dat'); and data=readtable(filename); however, I am continuing to run into the error: Error using readtable (line 318) Unable to find or open 'Laura Data.dat'. Check the path and filename or file permissions. I attached some helpful screenshots, I would really like to have this issue resolved as I am trying to make some plots with the .dat file. Some help would be incredibly appreciated.

 Réponse acceptée

Try using the second output from uigetfile() as well, in order to refer to the full path of the file selected:
[filename,pathname] = uigetfile('.dat');
data = readtable(fullfile(pathname,filename));

3 commentaires

I resolved this issue as I set the path to a new folder manually. Thank you for the help, much apprciated!
Hi Please, someone help here
Error using readtable (line 318)
Unable to find or open 'C:\Users\Dev\data\entNames.xlsx'. Check
the path and filename or file permissions.
Does the file 'C:\Users\Dev\data\entNames.xlsx' exist?
Also, please post your code.
It may be that you need to specify the full path properly, as in the original question and answer.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur App Building dans Centre d'aide et File Exchange

Question posée :

le 18 Mar 2022

Commenté :

le 25 Août 2022

Community Treasure Hunt

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

Start Hunting!

Translated by