Writing multiple arrays to the same excel sheet.
11 次查看(过去 30 天)
显示 更早的评论
Hello, as title says i want to write different arrays to the same excel sheet. The arrays I'm using are (both type n,1):
a(start:enda,2)
a(start:enda,3)
If i name a new array and try writing that one to the excel sheet with the commands shown below
b={a(start:enda,2);a(start:enda,3)}
xlswrite('error points.xlsx',b)
I get no results, plus the excel cells are blank with no data at all. How is this solved? In addition, how can I name these different arrays in the excel sheet?
Instead I'm using
xlswrite('error points.xlsx',a(start:enda,2))
xlswrite('error points.xlsx',a(start:enda,3))
opening two different sheets and merging them, which is a waste of time.
0 个评论
采纳的回答
Fangjun Jiang
2011-10-26
All you need to change is:
b=[a(start:enda,2);a(start:enda,3)]
or put them in two columns
b=[a(start:enda,2),a(start:enda,3)]
0 个评论
更多回答(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!