How to use writetable to write a file and save this file in the specific location
9 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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!
2 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Data Type Conversion 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!