Importing multiple .xlsx files to automate data processing

조회 수: 1 (최근 30일)
Phillip Ridley
Phillip Ridley 2019년 7월 6일
답변: Rik 2019년 7월 6일
Hi All,
Currently, I am using the readtable function to import .xlsx files into MATLAB and then convert the table to an array, using table2array, in order to manipulate the data. In order to manipulate the data set I need to put the dataset in the matlab directory and copy the filename into the readtable function. Is there an easier way to import data like this? I am interested in selecting a single folder and having MATLAB import all .xlsx datasets in that folder. Ideally, the files could be selected in some sort of order of priority. Hopefully this makes sense!

답변 (1개)

Rik
Rik 2019년 7월 6일
I would suggest using dir to create a list of the files and then parsing them in a loop. Probably using xlsread directly is a smarter way to read excel to an array.

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by