readtable decide which coloumns are read as string and which as number. xlsx file
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Magnus Rasmussen
le 24 Mar 2022
Réponse apportée : Peter Perkins
le 24 Mar 2022
Hi
Im trying to read an xlsx table, but readtable gives me the wrong format. some of my coloums are read as numbers and not strings. Thereby returning a NAN instead of the string i needed. My question. is there a way to force the datatype on readtable?
here is an example of how my data is set together in my input table
after reading into readtable it looks like this
RT = readtable("file.xlsx")
and here is the output
0 commentaires
Réponse acceptée
Plus de réponses (1)
Peter Perkins
le 24 Mar 2022
Magnus, detectImportOptions and subsequent modifications on what it returns are what you are looking for. You can set any or all of the variable types, and a whole lot more.
0 commentaires
Voir également
Catégories
En savoir plus sur Logical dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!