Create an excel file in a specific folder

41 vues (au cours des 30 derniers jours)
Alessandro Poppi
Alessandro Poppi le 23 Nov 2017
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.

Réponse acceptée

Image Analyst
Image Analyst le 23 Nov 2017
Modifié(e) : Image Analyst le 23 Nov 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 commentaires
Alessandro Poppi
Alessandro Poppi le 24 Nov 2017
It works. Thank you
AYUSH ANAND SAGAR
AYUSH ANAND SAGAR le 28 Oct 2020
i wanna create an attendance excel sheet from the date entered by the user
how can i do that?

Connectez-vous pour commenter.

Plus de réponses (1)

Zeynab Mousavikhamene
Zeynab Mousavikhamene le 9 Mar 2019
Thanks!

Catégories

En savoir plus sur Arduino Hardware dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by