Excel工作簿拆分为多个Excel文件
准备工作:微软Office Excel
操作步骤:
第一步,
第二步
第三步,复制下面这一段代码,立即执行
Sub 拆分工作薄()
Dim xpath As String
xpath = ActiveWorkbook.Path
Dim sht As Worksheet
For Each sht In ActiveWorkbook.Sheets
sht.Copy
ActiveWorkbook.SaveAs Filename:=xpath & "\" & sht.Name & ".xlsx"
ActiveWorkbook.Close
Next
MsgBox "工作薄拆分完毕!"
End Sub