用ole控件如何操作excel、powerpointer,急急急急急!!!!!!!!!
//从数据库取数据
blob lb_tempt,lb_nullblob
sqlca.autocommit=true
SELECTblob content
INTO :lb_tempt
FROM TClientHandy
WHERE id = :il_ID ;
sqlca.autocommit=false
if SQLCA.SQLCode < 0 then //查询数据库出错
MessageBox("数据库错误",SQLCA.SQLErrText)
return
end if
ole_1.objectdata =lb_tempt
//ole_1.activate(offsite!)
oleobject ole_client
ole_client=create oleobject
if ls_file_type='Word 文件' then
ole_client=ole_1.object.application
ole_client.documents.item(1).saveas("e:\opcrm\"+ls_document_name)
end if
if ls_file_type='Excel 文件' then
??????
end if
if ls_file_type='PowerPoint 文件' then
??????
end if
destroy ole_client
oleobject ole_t
ole_t=create oleobject
if ls_file_type='Word 文件' then
ole_t.connecttonewobject( "word.application")
ole_t.application.visible=true
ole_t.documents.open("e:\opcrm\"+ls_document_name)
end if
destroy ole_t
我的问题是:ole_client=ole_1.object.application
ole_client.documents.item(1).saveas("e:\opcrm\"+ls_document_name)
在world中可以,但是在excel和powerpointer中不可以,如何去做?
我这个主要实现从数据库中读取到excel和powerpointer,然后对修改进行保存,然后在保存到数据库,world 我已经实现,清高手指教!!!!