I have a compiled script that gathers data from a database and puts the acquired data into a .csv file. The last line of the script then calls ExecuteFile> using the .csv file as the parameter which opens the data in excel. Works fine on about 10 computers. This morning a co-worker tells me that the program doesn't work on his computer. When I look into it I see that the csv file is created and is correct and that Excel opens. However, Excel does not display any data. The excel screen is blank, most of the menu items are even greyed out.
After fooling around with this for 20 minutes I discovered that if I put a short wait as the last line. Everything works as planned. Its as if the File is used to start Excel but doesn't get passed to Excel.
The oddest part is it only fails to work on one computer. The following script will fail on that one computer. Works fine if the Wait> is unremarked. The computer is running Windows 7 and Excel 2007.
Code: Select all
Let>CSVFile=%temp_dir%FileForTesting.csv
WriteLn>CSVFile,wres,Item1%comma%Item2%crlf%Item3%comma%Item4
ExecuteFile>CSVFile
//Wait>1