准备工作:微软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
标签:xpath,文件,sht,Sub,多个,Dim,Excel,ActiveWorkbook From: https://www.cnblogs.com/fxcoding/p/16974091.html