Borrar filtros
Borrar filtros

Create an excel file in a specific folder

181 visualizaciones (últimos 30 días)
Alessandro Poppi
Alessandro Poppi el 23 de Nov. de 2017
Comentada: AYUSH ANAND SAGAR el 28 de Oct. de 2020
I need to know how to create an excel file and save it in a specific folder. This is the code I am using:
filename = 'diagramm.xlsx';
xlswrite(filename,vector_1,'Fluid');
xlswrite(filename,vector_2,'Power');
I don't find anything working in the older answers.

Respuesta aceptada

Image Analyst
Image Analyst el 23 de Nov. de 2017
Editada: Image Analyst el 23 de Nov. de 2017
Try this:
folder = 'c:/whatever';
if ~exist(folder, 'dir')
mkdir(folder);
end
baseFileName = 'diagramm.xlsx';
fullFileName = fullfile(folder, baseFileName);
xlswrite(fullFileName ,vector_1,'Fluid');
xlswrite(fullFileName ,vector_2,'Power');
  2 comentarios
Alessandro Poppi
Alessandro Poppi el 24 de Nov. de 2017
It works. Thank you
AYUSH ANAND SAGAR
AYUSH ANAND SAGAR el 28 de Oct. de 2020
i wanna create an attendance excel sheet from the date entered by the user
how can i do that?

Iniciar sesión para comentar.

Más respuestas (1)

Zeynab Mousavikhamene
Zeynab Mousavikhamene el 9 de Mzo. de 2019
Thanks!

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by