I have written a test application to do the above - this application works fine in debug mode but not if I run it without debug mode.
I have a window and a command button and this is the code in the command button. All I am trying to do is open an excel file, write to a cell in the sheet and close the file and excel. If I trace the code in debug mode it works fine. If I run it it does not write - it opens and closes the excel file but the setremote does not seem to be working. Any pointers ?
string s_regiondata[4]
long handle, rtn
run ("N:\Program Files\Microsoft Office\Office10\excel.exe " + "c:\Advances\grade1.xls", Minimized!)
handle = OpenChannel("Excel", "C:\Advances\grade1.XLS")
handle = OpenChannel("Excel", "C:\Advances\grade1.xls")
SetRemote("R1C10", "I", handle)
yield()
rtn = ExecRemote("[Save]", handle)
GetRemote("R1C9", s_regiondata[4], handle)
rtn = ExecRemote("[Close]", handle)
CloseChannel(handle)
rtn = ExecRemote("[quit()]", "Excel", "system")
I have a window and a command button and this is the code in the command button. All I am trying to do is open an excel file, write to a cell in the sheet and close the file and excel. If I trace the code in debug mode it works fine. If I run it it does not write - it opens and closes the excel file but the setremote does not seem to be working. Any pointers ?
string s_regiondata[4]
long handle, rtn
run ("N:\Program Files\Microsoft Office\Office10\excel.exe " + "c:\Advances\grade1.xls", Minimized!)
handle = OpenChannel("Excel", "C:\Advances\grade1.XLS")
handle = OpenChannel("Excel", "C:\Advances\grade1.xls")
SetRemote("R1C10", "I", handle)
yield()
rtn = ExecRemote("[Save]", handle)
GetRemote("R1C9", s_regiondata[4], handle)
rtn = ExecRemote("[Close]", handle)
CloseChannel(handle)
rtn = ExecRemote("[quit()]", "Excel", "system")