曹华群 : 

在软件中导出的文件,要注意文件名非法字符,首先要把这些非法字符(9个非法字符)去掉。

非法文件名称字符:/ \ : * ? " < > |

 

'去掉文件名的非法字符
Private Function ConvertFileName(sFile As String) As String
  '非法文件名称字符:/ \ : * ? " < > |
  Dim s As String
  s = sFile
  If s <> "" Then
    s = Replace(s, "/", "")
    s = Replace(s, "\", "")
    s = Replace(s, ":", "")
    s = Replace(s, "*", "")
    s = Replace(s, "?", "")
    s = Replace(s, """", "")
    s = Replace(s, "<", "")
    s = Replace(s, ">", "")
    s = Replace(s, "|", "")
    ConvertFileName = s
  End If
End Function

文档中心
Copyright © 2000-2016 粤ICP05021785号
地址:广州市天河区员村二横路8号全丰商业大厦808室 邮编:510600