Effacer les filtres
Effacer les filtres

XLS File write

1 vue (au cours des 30 derniers jours)
Pramod Kumar
Pramod Kumar le 30 Jan 2012
Modifié(e) : Voss le 28 Déc 2021
HI,
I am using following command for stroing a matrix data into the XL file, can anyone tell me, that how can add coulmns and rows name to the xcel file from matlab.
xlswrite(resultpath,data_read,'VDD_1V5_S1_test','B1')
Dataread is a matrix of 36X36. Resultpath is the path of the file. VDD_1V5_S1_test is the sheet name.
Thank you

Réponses (1)

Voss
Voss le 28 Déc 2021
Modifié(e) : Voss le 28 Déc 2021
You can do this with separate calls to xlswrite() (e.g., one call to write the matrix data, one call to write the column names, and one call to write the row names), or you can do it one call by writing a cell array containing everything, like this:
data = [0 1 2; 3 4 5];
cols = {'One' 'Two' 'Three'};
rows = {'1st' '2nd'};
xlswrite('test.xlsx',[{''} cols; rows(:) num2cell(data)]);

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by