我有一些excel工作表,我想在一个for循环中循环一遍,工作表名为a到A。
我试过这个:
for letter='A':'X'
[num,txt,raw] = xlsread('Grouting_sum_final.xlsx','%s',letter);
% Lots of code below here (not relevant for the problem)
end发布于 2018-12-06 21:17:41
是的,但您不需要行的'%s‘部分。
如果您转到文献网站,您将发现您必须将excel文件名作为第一个参数传递,作为第二个参数传递给工作表名。
因此,您的代码应该如下所示:
for letter='A':'X'
[num,txt,raw] = xlsread('Grouting_sum_final.xlsx',letter);
% Lots of code below here (not relevant for the problem)
end另外,我假设您知道您一直在重写从Excel表中检索到的数据。
https://stackoverflow.com/questions/53659606
复制相似问题