Importing Excel multiple sheet with individual multiple columns
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Houn JH
el 25 de Abr. de 2019
Respondida: Bob Thompson
el 25 de Abr. de 2019
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 comentarios
Respuesta aceptada
Bob Thompson
el 25 de Abr. de 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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Spreadsheets en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!