当前位置:网站首页>将一个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. 运行程序
边栏推荐
- The third phase of the contributor task is wonderful
- mount命令--挂载出现只读,解决方案
- 论文解读:GAN与检测网络多任务/SOD-MTGAN: Small Object Detection via Multi-Task Generative Adversarial Network
- Intelligent risk control China design and fall to the ground
- The role of the port
- 使用c语言实现井字棋(有源码,可以直接运行)
- JS案例练习(pink老师经典案例)
- gerrit 配置SSH Key和账号、邮箱信息
- Day 73
- Argparse模块 学习
猜你喜欢
随机推荐
Here is a memorial
深度学习Matlab工具箱代码注释
使用c语言实现井字棋(有源码,可以直接运行)
Simple mine sweeping in C language (with source code)
C language implementation guess Numbers (with source code, can be directly run)
PAT乙级刷题之路
OpenMLDB v0.5.0 released | Performance, cost, flexibility reach new heights
STM32学习笔记(白话文理解版)—USART通信接口
Scene-driven feature calculation method OpenMLDB, efficient implementation of "calculate first use"
经纬度求距离
Thesis unscramble TransFG: A Transformer Architecture for Fine - grained Recognition
127.0.0.1 connection refused
[Meetup Preview] OpenMLDB+OneFlow: Link feature engineering to model training to accelerate machine learning model development
OpenMLDB:线上线下一致的生产级特征计算平台
论文解读TransFG: A Transformer Architecture for Fine-grained Recognition
【Meetup预告】OpenMLDB+OneFlow:链接特征工程到模型训练,加速机器学习模型开发
谨此留个纪念
JVM tuning and finishing
Wonderful linkage | OpenMLDB Pulsar Connector principle and practical operation
论文解读:跨模态/多光谱/多模态检测 Cross-Modality Fusion Transformer for Multispectral Object Detection