当前位置:网站首页>将一个excel文件中多个sheet页“拆分“成多个“独立“excel文件
将一个excel文件中多个sheet页“拆分“成多个“独立“excel文件
2022-08-11 05:29:00 【学编程的北极熊】
1. 开启"开发工具"
- “文件” ---- “选项” ----“自定义功能区” ---- “开发工具”
2. 打开visual basic
3. 选择这个"thisworkbook",双击
4. 输入命令
Private Sub 分拆工作表()
Dim sht As Worksheet
Dim MyBook As Workbook
Set MyBook = ActiveWorkbook // 当前表格
For Each sht In MyBook.Sheets // 遍历整表
sht.Copy // 复制sheet页
ActiveWorkbook.SaveAs Filename:=MyBook.Path & "\" & sht.Name & ".xlsx", FileFormat:=xlNormal ' // **** 将工作簿另存为EXCEL的.xlsx格式
ActiveWorkbook.Close // 关闭当前表格
Next
MsgBox "文件已经被分拆完毕!" // 完成后提示
End Sub
5. 运行程序
边栏推荐
- scanf函数在混合接受数据(%d和%c相连接)时候的方式
- JS进阶网页特效(pink老师笔记)
- jdbc接口文档参考,jdbc接口方法逻辑探究
- The role of the port
- gerrit configure SSH Key and account, email information
- Wonderful linkage | OpenMLDB Pulsar Connector principle and practical operation
- STM32学习笔记(白话文理解版)—外部IO中断实验
- 智能风控中台设计与落地
- ARM assembly instruction ADR and LDR
- Visual studio2019 配置使用pthread
猜你喜欢
随机推荐
NUC980-镜像烧录
Visual studio2019 configuration uses pthread
Interpretation of the paper: Cross-Modality Fusion Transformer for Multispectral Object Detection
mk文件介绍
Day 85
Pinyougou project combat notes
The whole process of Tinker access --- Compilation
PAT乙级刷题之路
STM32学习笔记(白话文理解版)—小灯的点亮、闪烁、呼吸
C语言的编译
scanf函数在混合接受数据(%d和%c相连接)时候的方式
智能风控中台设计与落地
2021-09-11 C language variables and memory allocation
js常用方法对象及属性
JVM tuning and finishing
vim 编辑解决中文乱码问题
Day 82
STM32F407-浅~~析UART异步通信&USART_Init函数入口参数
Open Source Machine Learning Database OpenMLDB Contributor Program Fully Launched
SearchGuard配置