clear all
close all
clc
path = 'E:\matlab\20-20-3-1\'; %文件夹路径
Filesname = dir(strcat(path,'*.xls')); %找到当前路径文件夹下的以.xlsx为后缀的文件名,strcat是横向连接字符的函数
Length = length(Filesname ); %计算文件夹里xls文档的个数
for i = 1:11 %批量读取文件的内容并保存
path = 'E:\matlab\20-20-3-1\'; %文件夹路径
Filesname = dir(strcat(path,'*.xls')); %找到当前路径文件夹下的以.xlsx为后缀的文件名,strcat是横向连接字符的函数
[NA,TA,ALLA] = xlsread(strcat(path,Filesname (i).name),'data','V1:V3000');
[NB,TB,ALLB] = xlsread(strcat(path,Filesname (i).name),'data','Z1:Z3000');
[NC,TC,ALLC] = xlsread(strcat(path,Filesname (i).name),'data','AA1:AA3000');
[ND,TD,ALLD] = xlsread(strcat(path,Filesname (i).name),'data','AJ1:AJ3000');
[NE,TE,ALLE] = xlsread(strcat(path,Filesname (i).name),'data','AS1:BV3000');
[NF,TF,ALLF] = xlsread(strcat(path,Filesname (i).name),'data','GK1:GL3000');
[NG,TG,ALLG] = xlsread(strcat(path,Filesname (i).name),'data','GN1:GN3000');
[NH,TH,ALLH] = xlsread(strcat(path,Filesname (i).name)