i want save the table in file on my computer , i wrote the following but display error ? what should i do ?
Mostrar comentarios más antiguos
save Table3; fname='newfile.xlsx'; xlswrite(fname,Table3);
Error using save Unable to write file Table3: permission denied.
Error in two (line 261) save Table3;
Respuestas (2)
Jan
el 30 de En. de 2017
You do not have write permissions in the current folder. This is solved by specifiying a valid folder:
folder = tempdir;
fname = fullfile(folder, 'newfile.xlsx');
save(fname, 'Table3');
4 comentarios
mohammed elmenshawy
el 30 de En. de 2017
Editada: mohammed elmenshawy
el 30 de En. de 2017
Star Strider
el 30 de En. de 2017
You can find it by running this:
file_location = which('newfile.xlsx')
mohammed elmenshawy
el 30 de En. de 2017
Jan
el 31 de En. de 2017
@mohammed: The file is saved in the folder, which is defined by the tempdir command. Type this in the command window:
tempdir
Of course you can use any otehr folder also, but I could not guess which folder you want. Therefore I've chosen tempdir as example:
folder = 'C:\Data\YourFolder\xyz;
fname = fullfile(folder, 'newfile.xlsx');
save(fname, 'Table3');
You can use uigetfolder also to select a folder in a GUI, or the output of userpath.
Peter Perkins
el 31 de En. de 2017
0 votos
Also, if you mean "table" as in the data type whose class is table, don't use xlswrite, use writetable.
Categorías
Más información sobre MATLAB Report Generator en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!