Import specific columns from multiple xls files into the workspace

8 views (last 30 days)
Dear All, I am keen to import 2 specific columns from multiple excel sheets and export that into a workspace or a ne excel sheet, where the data lies between D46:D3045, E46:E3045.
I first started with
filename = DMA01L_C.xls;
sheet 1;
x1Range = 'D46:D3045';
x2Range = 'E46:E3045';
xlsread(filename,A,sheet,xlRange,x2Range,'basic');
but apparently its not working. I also tried this
files = dir('Users\sony\Downloads\Dropbox\Ski Simulator\Data\COF.xls')
for i = 1:numel(files)
data = xlsread(files(i).name);
Row (cm).(files(i).name) = data(:,1);
Col (cm).(files(i).name) = data(:,2);
end
Is there any way I could do it.
My data structure for one of the xls file looks like this
[D] [E]
[43] Row (cm) Col (cm)
[.]
[.]
[46] 8.61 6.13
[47] 8.66 6.16
[.]
[.]
[.]
[.]
[3045] 8.87 5.35
(sorry for the formating, but you know how it looks in excel. The brackets are the rows and columns.

Answers (0)

Community Treasure Hunt

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

Start Hunting!