鼠标放在sheet页标签上邮件选择查看代码
出现Excle 多个文档合并为一个 分多个sheet页
键入一下代码:
Sub Find()
Application.ScreenUpdating = False
Dim MyDir As String
MyDir = ThisWorkbook.Path & “”
ChDrive Left(MyDir, 1) 'find all the excel files
ChDir MyDir
Match = Dir("")DoIfNotLCase(Match)=LCase(ThisWorkbook.Name)ThenWorkbooks.OpenMatch,0openActiveSheet.CopyBefore:=ThisWorkbook.Sheets(1)copysheetWindows(Match).ActivateActiveWindow.CloseEndIfMatch=Dir("") Do If Not LCase(Match) = LCase(ThisWorkbook.Name) Then Workbooks.Open Match, 0 'open ActiveSheet.Copy Before:=ThisWorkbook.Sheets(1) 'copy sheet Windows(Match).Activate ActiveWindow.Close End If Match = Dir
Loop Until Len(Match) = 0
Application.ScreenUpdating = True
End Sub

点击运行子程序Excle 多个文档合并为一个 分多个sheet页
等待些许时间即可完成。

相关文章:

  • 2021-10-06
  • 2021-12-09
  • 2021-12-30
  • 2022-12-23
  • 2021-10-31
  • 2021-12-29
  • 2021-12-24
猜你喜欢
  • 2021-12-02
  • 2021-12-04
  • 2022-12-23
  • 2021-06-18
  • 2021-12-03
  • 2021-12-13
  • 2022-01-16
相关资源
相似解决方案