作者:乔山办公网日期:
返回目录:excel表格制作
多截点图,就这几句看不出来问题再哪儿.
.和..是当前目copy录和上级目录,代码修改下:zhidao
Dim spath As String, patha As String
Dim sfilename As String
Dim rown As Long
spath = Cells(2, 1).Value & Application.PathSeparator
sfilename = Dir(spath & "*", vbDirectory)
rown = 4
Do While sfilename <> ""
if sfilename<>"." and sfilename<>".." then
Cells(rown, 1).Value = sfilename
end if
sfilename = Dir
rown = rown + 1
Loop
可以,代码如下:
n = "abc.txt"
p = "d:\a\"
if dir(p & n)="" then p = "d:\b\"
msgbox "完整路径:" & p & n
使用vba来实现
使用dir或者fso文件系统对data文件夹里 *.CATPart进行遍历并提取内容
直接写入要求的区域内即可