批量修改Excel文件的工作表名
2010-09-21 14:32:10| 分类:
VBS
| 标签:
|举报
|字号大中小 订阅
for each file in createobject("scripting.filesystemobject").getfolder(createobject("wscript.shell").currentdirectory&"\恢复").files
if right(file,3)="xls" or right(file,4)="xlsx" then call excel(file)
next
msgbox "改名成功"
sub excel(e)
Set o = CreateObject("Excel.Application")
o.Workbooks.Open(e)
o.Sheets(1).Name = "kq"
o.ActiveWorkbook.Save
o.Quit
end sub
评论这张
转发至微博
转发至微博
评论