① excel复制多个文件中固定工作表到另一个总的工作表中(用宏写)
sub宏1()
dimp,n,st
setst=activesheet'所有文件的内容合并到当前工作表中
p="c:"'需要合并的文件所在的位置,必须以结尾
n=dir(p&"*.xls*")
whilen<>""
withworkbooks.openp&n
.sheets("附注").select
activesheet.usedrange.st.cells(st.usedrange.rows.count+1,1)
.close
endwith
n=dir
endwhile
endsub