excel2007文件格式xlsx批量转换为excel2003文件格式xls的宏代码
时间:2022-07-20 17:50:26
如何将excel2007文件格式xlsx批量转换为excel2003文件格式xls本文提供实现的宏代码.注意:xlsx文件转换为xls,前提是要在装Excel2007的机器上运行才行,有兴趣的朋友可以参考下,或许对你的遇到的问题有所帮助
复制代码代码如下:
Sub Macro1()
'
' Macro1 Macro
'
Dim myFiles
Dim i As Long
myFiles = Dir("D:\1\*.xlsx")
On Error Resume Next
Application.ScreenUpdating = True
Application.DisplayAlerts = False
Do While myFiles <> ""
Workbooks.Open Filename:="D:\1\" & myFiles
ActiveWorkbook.SaveAs Filename:= _
"D:\1\" & Left(myFiles, Len(myFiles) - 1), FileFormat:=xlExcel8, _
Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False
ActiveWindow.Close
myFiles = Dir
i = i + 1
DoEvents
Loop
MsgBox "全部转换完毕,共转换文件 " & i & "个"
End Sub
xlsx文件转换为xls,前提是要在装Excel2007的机器上运行才行。
标签:批量转换,xlsx,xls,文件格式
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Win10无法升级到21H1新版本怎么办?
2023-11-23 14:47:47
![](https://img.aspxhome.com/file/2023/5/50735_0s.jpg)
制作多种图表类型并存的Excel图表
2023-04-05 15:12:34
![](https://img.aspxhome.com/file/2023/1/39031_0s.jpg)
WPS2016段落缩进量如何增加减少
2023-09-22 15:35:13
![](https://img.aspxhome.com/file/2023/9/a163669_0s.jpg)
iOS 15都有哪些问题?iOS 16能修复吗?
2023-08-21 07:57:55
![](https://img.aspxhome.com/file/2023/2/45502_0s.jpg)
Win10电脑hosts权限无法添加怎么办?
2023-11-23 23:29:45
![](https://img.aspxhome.com/file/2023/8/50638_0s.png)
取消word文字下波浪线
2022-11-13 08:41:33
![](https://img.aspxhome.com/file/2023/8/34488_0s.gif)
2010excel如何进行数据处理
2023-04-06 09:16:45
![](https://img.aspxhome.com/file/2023/9/36789_0s.jpg)
word怎么制作整齐的填空题测试卷?
2023-06-26 02:41:49
![](https://img.aspxhome.com/file/2023/1/30681_0s.jpg)
Win10 20H2自带的杀软Windows Defender怎么关闭?
2023-11-14 19:59:20
![](https://img.aspxhome.com/file/2023/6/49286_0s.jpg)
Word2013中怎样录制宏
2023-11-29 20:08:38
![](https://img.aspxhome.com/file/2023/7/18397_0s.jpg)
如何将图片转换成Word文档
2023-07-03 08:36:02
Word2003中的文字快速替换为图片的方法
2022-10-30 09:44:06
![](https://img.aspxhome.com/file/2023/1/21811_0s.jpg)
不止PPT里可以设置各种背景,其实Word也可以设置各种背景
2023-01-01 00:03:13
![](https://img.aspxhome.com/file/2023/5/32525_0s.png)
word2007中禁用的加载项目怎么恢复?
2023-11-29 17:09:13
在word中如何画图?Word画图方法大全
2023-11-27 16:09:54
Win10专业版directX9安装失败怎么修复?
2023-11-21 06:21:09
![](https://img.aspxhome.com/file/2023/5/50045_0s.jpg)
Word怎么制作倒福
2023-11-24 12:20:47
![](https://img.aspxhome.com/file/2023/6/18006_0s.jpg)
word导入Excel的几种方法,比如通过插入对象,或者复制选择性粘贴等等来完成word导入Excel
2023-02-03 22:25:53
再增一城,厦门 e 通卡加入 Apple Pay 交通卡
2023-09-29 12:33:29
![](https://img.aspxhome.com/file/2023/1/a194671_0s.jpg)
word制表符箭头的大小不一,是怎么回事?
2022-11-01 12:17:17
![](https://img.aspxhome.com/file/2023/7/35377_0s.png)