Excel 多sheet分解成多个单独excel文件(VBA记录)
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 & “(”& sht.usedrange.rows.count-1 &“).xlsx” ’
ActiveWorkbook.Close
Next
MsgBox “拆分完毕!”
End Sub