欢迎大家动脑讨论,asp调用vb dll后,response.write Myobj.getOutPath 输出是一片空白,sfliename好象没传过来,为什么?vb程序如下
欢迎大家动脑讨论,asp调用vb dll后,response.write Myobj.getOutPath 输出是一片空白,sfliename好象没传过来,为什么?vb程序如下
Public str As String
Public Property Let strOutPath(s As Variant)
str = s
End Property
Private Property Get getOutPath()
getOutPath = str
End Property
还在Public Function aspexcel(ByVal SQLStr As String) As Boolean里加了str=sfilename(具体程序见下)
Public Function aspexcel(ByVal SQLStr As String) As Boolean
略
Dim sfilename As String
sfilename = CStr(FormatDateTime(Now, 0))
sfilename = App.path & "\ " & sfilename & ".xls "
Set xlBook = xlApp.Workbooks.Add
xlBook.SaveAs (sfilename)
Set xlSheet = Nothing
aspexcel = True
Exit Function
End Function
------解决方案--------------------如果你真的在Public Function aspexcel(ByVal SQLStr As String) As Boolean里加了str=sfilename
那么请在调用response.write Myobj.getOutPath 前先调用 Myobj.aspexcel(xxxx)
真的最后说一次了,不然估计要疯了
------解决方案--------------------App.path现在我才看到
孩子,你真行
赶快给你的aspexcel加多一个参数,在调用时传个server.mappath( ". ")的值进去先吧