sheet表转独立的表格
方案一:
已测试有效,拆分表格到当前文件夹中
Sub sheet转独立文件()
Dim sht As Worksheet
Application.ScreenUpdating = False
ipath = ThisWorkbook.Path &"\"
For Each sht In Sheets
sht.Copy
ActiveWorkbook.SaveAs ipath & sht.Name
ActiveWorkbook.Close
Next
Application.ScreenUpdating = True
End Sub
方案二:
拆分表格到3月文件夹下
Sub 拆分表格()
Dim x As Integer
Dim wb As Workbook
Application.ScreenUpdating = False
For x = 2 To 32
Sheets(x).Copy
Set wb = ActiveWorkbook
With wb
.SaveAs ThisWorkbook.Path & "/3月/" & Sheets(x).Name & ".xlsx"
.Close True
End With
Next x
Application.ScreenUpdating = True
End Sub
网友评论