Importing variables from an xlsx/txt file

Hello everybody-
I was wondering if there is a way to import variables from xlsx or txt file in workspace with names ? I know about import wizard > Column vectors and generate script. But I have huge data set in which variables positions are varying so I'm much interested to read a file with its header so that in workspace I get all variables with that command?
Thanks in advance

 Respuesta aceptada

Walter Roberson
Walter Roberson el 21 de Ag. de 2015

0 votos

As I suggested in your other posting, use readtable() .
Otherwise you are asking for variables to be "poofed" into existence based upon the column names. Creating variables dynamically is rarely a good idea.

1 comentario

amberly hadden
amberly hadden el 21 de Ag. de 2015
Thanks Walter I'm already done with that part now I'm working on outputting struct in a txt file
Regards

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Variables en Centro de ayuda y File Exchange.

Preguntada:

el 20 de Ag. de 2015

Comentada:

el 21 de Ag. de 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by