欢迎大家动脑讨论,asp调用vb dll后,输出的只是e:\addf\csv,而我想输出e:\addf\csv\2007-3-9-上午-11-36-51.xls,具体vb和asp程序如下
欢迎大家动脑讨论,asp调用vb dll后,输出的只是e:\addf\csv,而我想输出e:\addf\csv\2007-3-9-上午-11-36-51.xls,具体vb和asp程序如下
Public str As String
Public Property Let strOutPath(s As Variant)
str = s
End Property
Public Property Get getOutPath()
getOutPath = str
End Property
Public Function aspexcel(ByVal SQLStr As String) As Boolean
略
Dim sfilename As String
sfilename = CStr(FormatDateTime(Now, 0))
sfilename = Format(CDate(sfilename), "yyyy-m-d-AMPM-hh:mm:ss ")
sfilename = Replace(sfilename, "AM ", "上午 ")
sfilename = Replace(sfilename, "PM ", "下午 ")
sfilename = Replace(sfilename, ": ", "- ") ' '
str = sfilename
sfilename = App.Path & "\ " & sfilename & ".xls "
aspexcel = True
Exit Function
End Function
<%
set Myobj=server.CreateObject( "projectexcel.classexcel ")
Myobj.strOutPath=Server.Mappath( "csv ")
response.write Myobj.getOutPath
%>
[解决办法]
Public str As String
Public Property Let strOutPath(s As Variant)
str = s
call aspexcel( " ") ' ' ' ' ' ' ' ' ' ' ' '根据你的调用的情况,要执行一下,才能正确。
End Property
Public Property Get getOutPath()
getOutPath = str
End Property