how to write certain rows in excel using xlswrite
3 ビュー (過去 30 日間)
古いコメントを表示
This is my values A:1 4 2 5 3 6 8 7 9 10 1 2 11 13 14 15 and
for i=1:1:16
xlswrite('filename.xlsx',A)
end
and here my excel sheet having one values only:15
but am needed 1 4 2 5 3 6 8 7 9 10 1 2 11 13 14 15
0 件のコメント
採用された回答
その他の回答 (2 件)
Muruganandham Subramanian
2012 年 10 月 5 日
Hi kesavan,
Insteadof writing it as 'filename.xlsx' .try it as 'filename.xls'
0 件のコメント
Image Analyst
2012 年 10 月 5 日
Does that mean your question is figured out? I mean, you just wrote the same array of 15 numbers out to the same workbook/worksheet 16 times in a row, so what were you expecting?
Or maybe A is just a scalar, not an array and you wanted each element in a different row. Like this:
for k = 1 : 16
cellReference = sprintf('A%d', k);
xlswrite('filename.xlsx', A(k), cellReference)
end
But you don't want to use xlswrite that many times unless you're willing to have it be very slow because it has to launch and shutdown Excel every iteration in your loop. You'd want to use xlswrite1 (File Exchange) and ActiveX programming.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Spreadsheets についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!