Write Matlab data to an Excel sheet
Afficher commentaires plus anciens
Hello,
I am trying to write the output data, which i am getting as the results of my code into an excel sheet.
My problem is, eventhough the results are getting written into the excel sheet it only gives me the last set of data.
** The resluts are getting written only into one row. So, they are getting replaced.
Can someone advice me how can i write these data into row by row?
I am using the following code.
T = table(a,b,date);
filename = 'data.xlsx';
writetable(T,filename,'Sheet',1,'Range','A1:A500')
Thanks!
Réponses (3)
KSSV
le 27 Juin 2019
T = table(a,b,date);
filename = 'data.xlsx';
writetable(T,filename,'Sheet',1)
2 commentaires
Anounymous85
le 28 Juin 2019
KSSV
le 28 Juin 2019
Are you running any loop ? Inside the loop you are writitng? Show us the full code.
Shameer Parmar
le 27 Juin 2019
Modifié(e) : Shameer Parmar
le 27 Juin 2019
try to expand the given rang like.. 'A1:Z500'
use
writetable(T,filename,'Sheet',1);
OR
writetable(T,filename,'Sheet',1, 'Range','A1:Z500');
1 commentaire
Anounymous85
le 28 Juin 2019
sdas sda
le 28 Juin 2019
0 votes
I think that. The range term may varies as the number of loop varies. The number of loop is one,the range term may be A2:C2.The number of loop is two, the range term may be A3:C3,and so on. Then the previous data may not be overwrited by the new data that will be writed into the Excel as inputs. I suppose that.
Catégories
En savoir plus sur Spreadsheets dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

