609
社区成员
发帖
与我相关
我的任务
分享
int i,handle,n
string excel
string excel_path
registryGet("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\excel.exe",&
"Path",excel_path)
if right (excel_path,1)='\' then
excel_path += 'excel.exe'
else
excel_path += '\excel.exe'
end if
if not fileexists(excel_path) then
messagebox("提示","~n找不到 Excel 程序文件,请确认是否已经安装该软件。 ~n")
close(parent)
return
end if
run(excel_path+' book1.xls')
//handle=OpenChannel("Excel","book1.xls")
n=dw_a.rowcount( )
//messagebox(string(n),handle)
for i= 1 to n
SetRemote("r"+string(i+1)+"c2",dw_a.getitemstring(i,1),'excel','book1.xls')
//messagebox('',string(i))
next
//CloseChannel(handle)