SupportTeam Report post Posted 07/15/2004 06:39 PM Massimo wrote: Hello, i have develop this flow from clients to storage data in excel file. Then in excel file i want to store even the Name of the caller over the CIDnumber (present in Database). The VBscript is: Dim xlApp, xlBook, xlSht Dim filename, value1, value2, value3, value4, Name on error resume next filename = "c:\warehouse.xls" Set xlApp = CreateObject("Excel.Application") set xlBook = xlApp.WorkBooks.Open(filename) set xlSht = xlApp.activesheet 'assign to Name the result of variable from DB, position 1_1 Name = $RV[GetClientRecord_1_1] xlApp.DisplayAlerts = False 'write data into the spreadsheet xlSht.Cells(2, 1) = $RV_CIDNUMBER xlSht.Cells(2, 2) = Name xlSht.Cells(2, 3) = $RV[GetNumbersContatore] xlBook.Save xlBook.Close SaveChanges=True xlApp.Close xlApp.Quit 'always deallocate after use... set xlSht = Nothing Set xlBook = Nothing Set xlApp = Nothing Where is the problem? Can you advise me? Thanks Massimo Share this post Link to post
SupportTeam Report post Posted 07/15/2004 06:41 PM I suspect you should change: Name = $RV[GetClientRecord_1_1] to: Name = "$RV[GetClientRecord_1_1]" All strings should be surrounded with quotes... if that does not fix it try removing the on error resume next from the VBScript and see what error message pops up when you run the script. Share this post Link to post
Guest Massimo Report post Posted 07/19/2004 09:22 AM Thanks, now it works fine. Share this post Link to post