posts - 17,  comments - 6,  trackbacks - 0

 


int     ret      
string filename
string filename2
string resume

filename
= " d:\smis2\xmk.xls "
filename2
= " d:\smis2\2006050120xmk.xls "
resume
= " d:\smis2\resume.xlw "
filedelete(resume)
oleobject    xlapp,xlsub     
xlapp
= create oleobject
ret
= xlapp.connecttonewobject( " excel.sheet " )   
// ret=xlapp.connecttonewobject("excel.application")   

if     ret < 0     then      
             messagebox(
" 你的电脑未安装Excel " ,string(ret))      
             
return       
end    
if       
xlapp.application.workbooks.open(filename)      
xlsub
= xlapp.application.activeworkbook.worksheets[ 1 ]      

xlsub.cells[
4 , 2 ].value = " 我是吴吴 "

xlapp.saveas(filename2,
true )
messagebox(
" aa " , " aa " )
xlapp.application.save(
'   ' )
// xlapp.application.close()
xlapp.application.quit()
xlsub.disconnectobject()
xlapp.disconnectobject()
destroy xlsub
destroy xlapp

posted on 2006-10-20 10:09 风中的舞者 阅读(740) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航:
 
<2006年10月>
24252627282930
1234567
891011121314
15161718192021
22232425262728
2930311234

常用链接

留言簿(1)

随笔档案

文章档案

java技术

搜索

  •  

最新评论

阅读排行榜

评论排行榜