按Alt+F11——菜单栏——刺进——模块——张贴以下代码;
按F5——再关cel操作界面:
Sub cfl()
Dim fs, f, f1, fc, s, x, rows fs = CreateObject(“Scripting.FileSystemObject”)
Set f = fs.GetFolder(“E:总”) 寄存文件的目录,自己依据实践修正
Set fc = f.Files
x = 1
For Each f1 In fc
If Right(***.Name, 3) = “xls” Then
***.)
rowss = Workbooks(***.Name).Sheets(1).Range(“A65536”).End(xlUp).Row
columnss = Workbooks(***.Name).Sheets(1).columns.Count
Workbooks(***.Name).Sheets(1).Range(“A1:z” & CStr(rowss)).Copy
Workbooks(1).Activate
Workbooks(1).Sheets(1).Range(“A” & CStr(x) & “:z” & CStr(x + rowss)).Select
Workbooks(1).Sheets(1).Paste
Application.CutCopyMode = False
For j = 1 To rowss
For i = 1 To columnss
Workbooks(1).Sheets(1).Cells(x + j, i).Value = _
Workbooks(***.Name).Sheets(1).Cells(j, i).Value
Next i
Next j
x = x + rowss
Workbooks(***.Name).Close savechanges:=False
End If
Next
End Sub
版权声明:以上文章转载自互联网用户,该文观点仅代表作者本人。文章内容仅供参考,不构成建议,不代表快递查询网立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如有侵权请联系:1048208551@qq.com,将立刻删除。