STRING sOOoDate,sOOoDate1,sOOoDate2;
FUNCTION GetOOoData2()
INT hChannel,iErr,hChannel2;
hChannel = DDEhInitiate("soffice", "D:\BBB.ods");
Sleep(3);
IF hChannel > -1 THEN
sOOoDate=DDERead("soffice","D:\BBB.ods","Sheet1.A4");//可行
sOOoDate1 = DDEhRequest(hChannel, "Sheet1.A3");//可行
sOOoDate2=DDEWrite("soffice","D:\BBB.ods","Sheet1.B10","nnnnn"); //不可行
iErr=DDEhPoke(hChannel,"Sheet1.B9", "mnhlijk"); //不可行
iErr=DDEhExecute(hChannel,"【Save】"); //不可行
iErr=DDEhExecute(hChannel,"【quit】");//不可行
iErr=DDEexec("D:\BBB.ods","【save】");//不可行
iErr=DDEhTerminate(hChannel);
hChannel = -1;
END
END
后面注释标有可行的语句可以执行,标不可行的语句无法执行,不知道什么原因,请大侠们指点,感激不尽!(语句中的方括号是英文的中括号,提交上去就成了中文的方括号了。)