| 发表于:2007-03-09 13:38:56 楼主 |
欢迎大家动脑讨论,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 %> |
|
|
|
|