Can you write an array containing both numerical data and a string to excel?
이전 댓글 표시
Hi,
I am trying to send an array which contains both numerical data and a string to an excel file.
I begin by reading in the excel file and then append new data to the bottom of my data before sending this back to the excel file. A simplified example is shown:
M=xlsread('Book1.xlsx',1);
N=[0:10];
M=[M;N]; %To add my data N to the bottom of the original M.
xlswrite('Book1.xlsx',M,1,'A2')
This works fine as long as I use only numerical data. However I would like to extend the functionality so that I could also write a variable x to the excel file, where x is a string stored in my workspace.
So my data would look like the following:
N=[0 1 2 3 4 5 6 7 8 9 10 x]
where x is a string.
Is this possible?
Many thanks,
David Graham.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!