1.打开Excel,进入VBA编辑器
2.在VBA编辑器,选择:插入->模块
3.将以下代码填入弹出窗口,并按“F5”执行
- 程序运行(鼠标一直处于转圈状态)
- 根据数据多少,运行一段时间,并不是死机,一般会有几分钟时间。、
- 每一个sheet工作表的表名会被作为生成的独立excel的文件名
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