Info
此问题已关闭。 请重新打开它进行编辑或回答。
How to insert index table on XLS
1 次查看(过去 30 天)
显示 更早的评论
How can I insert a Index table on XLS file?
On matlab I have a matrix with 8colums and 200rows.
I need to insert on the first row of each column the title.
I'm using xlswrite('CO2.xls',A) for exporting the matrix.
Can anybody help me please?
0 个评论
回答(1 个)
Fangjun Jiang
2011-10-28
I can think of two ways. First one is to write twice. The second one is to combine the Header and Data and then write once. See if the first one solves your problem.
Header={'colA','colB','colC'};
Data=rand(20,3);
xlswrite('CO2.xls',Header,1,'A1');
xlswrite('CO2.xls',Data,1,'A2');
2 个评论
Fangjun Jiang
2011-10-28
Run the code in my answer and you'll see. 'A1','A2' is the starting cell position in the spreadsheet that you want to write the data to. Check the help of xlsread().
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!