arrange the values in an array
1 次查看(过去 30 天)
显示 更早的评论
I have an array A(80 rows and 5 columns). I want to export it as a table to microsoft word as the values in A (i:i+4,j)are placed in one cell with no cell line between them. Not sure if it's possible in Matlab.
3 个评论
采纳的回答
Andrei Bobrov
2011-4-29
in Excel
xlswrite('namexls',cellfun(@(x)num2str(x.'), mat2cell(A,5*ones(size(A,1)/5,1),ones(1,size(A,2))),'UniformOutput' , false),1,'A1');
更多回答(1 个)
Friedrich
2011-4-29
Or you can use Word as Com Server. I prepared a little example for you:
e = actxserver('Word.Application')
e.visible = 1
doc = e.newDocument.Application.Documents.Add
doc.Content.InsertAfter('text')
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!