필터 지우기
필터 지우기

Create an excel file in a specific folder

조회 수: 181 (최근 30일)
Alessandro Poppi
Alessandro Poppi 2017년 11월 23일
댓글: AYUSH ANAND SAGAR 2020년 10월 28일
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.

채택된 답변

Image Analyst
Image Analyst 2017년 11월 23일
편집: Image Analyst 2017년 11월 23일
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
Alessandro Poppi
Alessandro Poppi 2017년 11월 24일
It works. Thank you
AYUSH ANAND SAGAR
AYUSH ANAND SAGAR 2020년 10월 28일
i wanna create an attendance excel sheet from the date entered by the user
how can i do that?

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Zeynab Mousavikhamene
Zeynab Mousavikhamene 2019년 3월 9일
Thanks!

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by