Is it possible to recover the Excel sheet active Cell value using DDE ?
I've tried this following code without succes :
Code: Select all
_ = vpiDde::request(Conv,"Cells(activecell.Row,15)",1000,vpidde::cf_Text,Val),
Code: Select all
_ = vpiDde::request(Conv,"Cells(activecell.Row,15)",1000,vpidde::cf_Text,Val),
Code: Select all
task_win_eh(_Win,e_Menu(id_eval_view,_ShiftCtlAlt),0):-!,
% View results by Excel program
% NullWin = cast(WINDOW, 0),
% View results using Excel
TaskWin = vpi_GetTaskWin(),
msg_vpi_getresstr(ev_excel_how ,Ex_how , "\t"),
msg_vpi_getresstr(ev_excel_name,Ex_name, "\t"),
%Init_Excel = "C:\\Progra~1\\Micros~1\\Office\\Excel.exe",
Init_Excel = "\"C:\\Program files\\Microsoft Office\\Office\\Excel.exe\"",
Excel = dlg_GetStr( Ex_how, Ex_Name, Init_Excel ),
my_msg_appendstr(Excel,"\n"),
ApplicationId = vpi_CreateProcess( TaskWin, Excel, "", wsf_Maximized ),
dde_Init([ddef_clientonly]),
dde_Connect_to("Excel", "", max_wait, max_sleep, Conv),
dde_EnableEvents(Conv, b_false),
dde_Poke(Conv, "R1C1", str("Application.Run \"FuelOpen\""),ddecf_text, 0),
dde_DisConnect(Conv),
dde_End,
!.
Code: Select all
_ = vpiDde::request(Conv,"LC15",1000,vpidde::cf_Text,ActiveCellValue),