reading excel files with texts in matlab
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
cgo
il 19 Ago 2018
Risposto: Image Analyst
il 19 Ago 2018
I have an excel file with fields that are texts that I want to read.
X = xlsread('filename') reads the numbers, but does not read the texts. How to solve this problem?
0 Commenti
Risposta accettata
Più risposte (1)
Image Analyst
il 19 Ago 2018
Try this:
[numbers, strings, raw] = xls(fullFileName);
strings will contain a cell array of all the strings in your workbook, with the upper left (1,1) cell containing the upper left string in your workbook, regardless of where it occurs. So if the leftmost string is in column D and the top most string is in row 5, then strings(1,1) will be the contents of Excel cell D5, regardless if there is anything actually in that particular cell or not. So you might have row 98 be the first string in Column D, and column R be the first column in row 5, but D5 will still be at strings(1,1) but it will be empty. Basically, strings is the bounding box of all the cells with strings in them regardless of the pattern of how they're placed in Excel. Hope that explains it.
0 Commenti
Vedere anche
Categorie
Scopri di più su Spreadsheets in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!