标签:filename pat name 字符 xlsx 路径 提取 split file
从指定的带有路径和文件名的字符串里提取文件名:
Dim sFile as string
Dim sFileName as string
Dim sPath as string
sFile="D:\xxx\xxx\xxx\aa.xlsx"
sFileName=Split(sFile,"\")(Ubound(Split(sFile,"\")))
sPath=mid(sFile,1,len(sFile)-len(Split(sFile,"\")(Ubound(Split(sFile,"\"))))-1)
Excel VBA 从一个带文件夹名和文件名的字符串里提取文件夹名和文件名
标签:filename pat name 字符 xlsx 路径 提取 split file
原文地址:https://www.cnblogs.com/SH170706/p/12888548.html