Issue with reading text value from a cell in MS Excel using readmatrix
조회 수: 28 (최근 30일)
이전 댓글 표시
I am trying to read a text data in a cell in Excel to a variable in Matlab using the "readmatrix" command. I am using the following syntax.
readmatrix("ABC.xlsx","Sheet",'S1',"Range",'N1:N1')
But it is reading NaN value instead of the actual text. If I change the cell location (range) to another cell containing numeric data it is reading correctly. But only in case of text data this is happening. Kindly help me in resolving this issue. Thank you.
댓글 수: 0
채택된 답변
Jonas
2022년 8월 8일
if i am not mistaken, readmatrix expects numbers for each entry, so the numbers can be but into a matrix. if your data contains numbers and text (multiple characters per cell), try readcell instead
추가 답변 (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!