Importing Excel multiple sheet with individual multiple columns
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi, first of all, thank you for reading this. I am trying to import a excel data (Attached file: Data_1.xlsl) with mutiple sheet and specific columns (ex: variable "LGRF_Fx" at each 3 trials). Below is the what I am trying to get the values.
I would appreciate sombody help me to find out.
-----------------------------
S01 = xlsread('Walking_Mastersheet_1.xlsx', 1);
T1 = S01(:, 10)/9.8;
T2 = S01(:, 19)/9.8;
T3 = S01(:, 37)/9.8;
S01=[T1,T2,T3];
S02 = xlsread('Walking_Mastersheet_1.xlsx', 2);
T1 = S02(:, 10)/9.8;
T2 = S02(:, 19)/9.8;
T3 = S02(:, 37)/9.8;
S02=[T1,T2,T3];
S03 = xlsread('Walking_Mastersheet_1.xlsx', 3);
T1 = S03(:, 10)/9.8;
T2 = S03(:, 19)/9.8;
T3 = S03(:, 37)/9.8;
S03=[T1,T2,T3];
.
.
.
DataTable = [S01,S02,S03....S15];
댓글 수: 0
채택된 답변
Bob Thompson
2019년 4월 25일
What exactly is your question? What specifically do you need help with?
xlsread is only able to read one sheet at a time, so when reading multiple sheets it is necessary to call xlsread for each sheet.
Based on the context, I'm going to guess part of what you're asking for is a way to automate the process. Because you are looking for the same cells in each sheet that is relatively easy.
DataTable = [];
for i = 1:numsheets
tmp = xlsread('Walking_Mastersheet_1.xlsx',i);
DataTable = [DataTable,tmp(:,10)/9.8,tmp(:,19)/9.8,tmp(:,37)/9.8];
end
댓글 수: 0
추가 답변 (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!