How to overwrite an excel file, matlab 2018?
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I need to overwrite an excel file each time write table function runs but I don’t have Matlab 2020. And I cannot delete the file as I am later using it to be uploaded in my app for creating a table in my app.
How can I solve the problem
4 Kommentare
Image Analyst
am 25 Dez. 2023
Then just call the writetable function over and over again. It will overwrite the existing file.
Antworten (1)
Sulaymon Eshkabilov
am 25 Dez. 2023
Here is one code if understood your question correctly:
FName = 'Renew_Table.xlsx';
D = array2table(randi(255, 7, 3))
writetable(D,FName,'Sheet',1);
for ii=1:3
D = readtable(FName);
D{:,:} = D{:,:}*ii;
writetable(D,FName,'Sheet',1);
end
D = readtable(FName)
Siehe auch
Kategorien
Mehr zu Data Import from MATLAB finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!