Importing Excel multiple sheet with individual multiple columns
1 view (last 30 days)
Show older comments
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 Comments
Accepted Answer
Bob Thompson
on 25 Apr 2019
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 Comments
More Answers (0)
See Also
Categories
Find more on Spreadsheets in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!