:::
OOo使用者討論區

請教我可以到哪查VB呼叫OPEN OFFICE的元件資料

discuss pic 2006-03-13 16:20:55
我已經可以用VB呼叫出OPEN CALG的FUNCTION
可是我要找可以寫入資料的元件請問哪可以查到ㄋ
discuss pic 2006-03-13 17:21:26
http://api.openoffice.org/SDK/index.html
http://api.openoffice.org/DevelopersGuide/DevelopersGuide.html

Developer's Guide 暫時我只見有簡體中文的翻譯 (StarOffice 8 版本):
http://docs.sun.com/app/docs/doc/819-1325?l=zh
志力建立 LibreOffice 的用戶和開發社群
discuss pic 2006-04-18 22:55:03
Leo
我現在想要使用VB6與Openoffice裡面的Calc文件相互連結,或者應該說希望透過VB6去撰寫一個類似Excel的文件資料.
不知這樣的source code範例或相關資訊要在哪邊才會有!
詳細應該是這樣的,以前我會使用Microsoft Excel Object Library去call excel產生.xls檔案.在Openoffice裡面,若也可以的話,將會非常的好.但不知哪邊可以找到相關的訊息或簡單的source code.

Leo
discuss pic 2006-06-07 13:20:26
Dim objserviceManager As Object
Dim objDesktop As Object
Dim objDocument As Object
Dim args()



Public Sub openoffice()

Set objserviceManager = CreateObject("com.sun.star.ServiceManager")
'Create the Desktop
Set objDesktop = objserviceManager.createInstance("com.sun.star.frame.Desktop")
'args is the necessiory params
Set objDocument = objDesktop.loadComponentFromURL("private:factory/scalc", "_blank", 0, args)
Set oSheet = objDocument.getSheets().getByIndex(0)
With oSheet
For i = 1 To 9
For j = 1 To 9
.getCellByPosition(i, j).setString (i & "*" & j & "=" & i * j)
Next
Next
End With


End Sub



Private Sub cmDwrite_Click()
Call openoffice
End Sub


Private Sub Command1_Click()
Dim open_office_name As String

open_office_name = "calc.ods"
'xxx = "file:///" & Replace(xxx, "/","\/
Path = Replace(App.Path & "\" & open_office_name, "\ ", "/")
objDocument.storeToURL "file:///" & Path, args
objDocument.Close (True)
Label1.Caption = "Have write the file to your computer the path is : " & App.Path & "\" & open_office_name
End Sub
discuss pic 2006-08-02 14:11:35
在VB6里我怎么找不到calc可用的引用呢?
要怎么设定才可以添加进来?
:::

快速登入

線上書籍列表

誰在線上

18人線上 (17人在瀏覽互動討論區)

會員: 0
訪客: 18

更多…