On this line:
replace 'foo.xls' with any dynamic name you feel is necessary. You could even generate a GUID if using SQL Server like so:Code:If objExcel.SaveWorksheet(Server.MapPath("foo.xls")) then
Code:Function CreateGUID() Dim cn Dim rs Set cn = Server.CreateObject("ADODB.Connection") ' adjust the connection string if required cn.Open "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Data " _ & "Source=(local)" Set rs = cn.Execute("SELECT NEWID()") If Not rs.EOF Then CreateGUID = rs(0) ' clean up rs.Close cn.Close End Function



LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks