I have a routine in VB6 that populates a Grid into a Calc spreadsheet - Code below.
I cannot figure out how to populate the NumberFormats object (o??????).
Any Ideas?
Code: Select all
Dim oServiceManager As Object
Dim oDesktop As Object
Dim oDocument As Object
Dim oSheet As Object
Dim oWindow As Object
Dim oFrame As Object
Dim oLocale As Object
Dim oNumberFormats As Object
Set oServiceManager = CreateObject("com.sun.star.ServiceManager")
Set oDesktop = oServiceManager.createInstance("com.sun.star.frame.Desktop")
' Create a new spreadsheet document.
Set oDocument = oDesktop.loadComponentFromURL("private:factory/scalc", "_blank", 0, Array())
Set oFrame = oDesktop.ActiveFrame
Set oWindow = oFrame.GetContainerWindow
Set oLocale = oServiceManager.Bridge_GetStruct("com.sun.star.lang.Locale")
oDocument.getCurrentController.getFrame.GetContainerWindow.SetVisible False
oNumberFormats = o???????.NumberFormats [color=#808000]This is where I need to populate the oNumbeFormats object[/color]
' Get Spreadsheets Object
Set oSheet = oDocument.Sheets(0).getByIndex(0)
......
Laurie Borlase