Hi All,I am trying to read a Symphony Spreadsheet file using LotusScript through API. I am able to get hold of the number of sheets, but i am not able to retrieve the name of each sheet.
Also, in each sheet i can access the cells, but i am not able get the total rows in a given sheet.
Please help.
Regards,
Muthuselvan.
Code:
Set Me.objServiceManager = CreateObject(“com.sun.star.ServiceManager”)
Set Me.objDesktop = Me.objServiceManager.createInstance(“com.sun.star.frame.Desktop”)
…
Function GetSheetNames() As Variant
On Error Goto errgetname
Dim oSheet As Variant
Dim cnt As Integer
Redim Sheetname(Me.Spreadsheetscount-1) As String
For cnt = 0 To Me.Spreadsheetscount-1
Set oSheet = Me.Symphonydoc.Sheets( cnt )
If Not (Isempty(oSheet) Or Isnull(oSheet) Or oSheet Is Nothing ) Then
Sheetname(cnt) = oSheet.getName()
End If
Next
Me.GetSheetNames = Fulltrim(Sheetname)
Exit Function
errgetname:
Msgbox "Get Sheet - Error" & Str(Err) & ": " & Error$ & " @ " & Cstr(Erl)
Call CloseDocument()
Exit Function
End Function
The below line of code is not working.
Sheetname(cnt) = oSheet.getName()
Also, oSheet.getRows().getCount() is not working as well.