|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
[backcolor=rgba(255, 255, 255, 0.93)]首页
[url=]用户 [/url]
合伙人
我想把excell里Sheet2,AB1,AB2,AB3,AB4.......,AB2940单元格的内容分别复制到D:\BaiduNetdiskDownload\888\文件夹下的文本文件0 (1),0 (2),0 (3)....0 (2940)里面。不知道循环怎么写,求大侠!!
For i = 1 To 2940
For l = 1 To 2940
Windows("1.xlsx").Activate
Sheets("Sheet2").Activate
Range("ab(i").Select
Selection.Copy
Workbooks.OpenText Filename:="D:\BaiduNetdiskDownload\888\0 (l).txt"
Windows("0 (l).txt").Activate
Range("b2:b2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Windows("0 (l).txt).Activate
ActiveWorkbook.Close SaveChanges:=True
Next l
Next i
|
|