필터 지우기
필터 지우기

How to use writetable to write a file and save this file in the specific location

조회 수: 13 (최근 30일)
Hi all,
I have a structure and use struct2table to convert it as table, then use writetable function to generate a xlsx file, but my question is how to use writetable function to generate the file in the specific folder location, because my code (in the following) is always generate the file in the default location.
% Output the file
for i = 1 : size(M,2)
temp1 = M(i); %The number of columns of M
TYPE = temp1.type;
temp1 = rmfield(temp1,'type');
writetable(struct2table(temp1), 'New_file.xlsx', 'sheet', TYPE)
clearvars temp1
end
disp('Done!')
Could you please show me how to generate the file in an specific location, many thanks in advance for help!

답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by