//试试这个
oleobject ole_1
//
ole_1 = create oleObject
//
IF ole_1.ConnectTonewObject("Excel.application") <> 0 THEN
MessageBox('OLE错误','OLE无法连接!')
Destroy ole_1
return
END IF
晕
if RegistryGet( "HKEY_LOCAL_MACHINE\Software\microsoft\office\8.0\excel\installroot", "path", RegString!, df)=-1 then
if RegistryGet( "HKEY_LOCAL_MACHINE\Software\microsoft\office\9.0\excel\installroot", "path", RegString!, df)=-1 then
RegistryGet( "HKEY_LOCAL_MACHINE\Software\microsoft\office\10.0\excel\installroot", "path", RegString!, df)