hi friends
I have to find sheet index (its name is "my sheet 1")
Dim Doc As Object
Dim Sheet As Object
Doc = ThisComponent
Sheet = Doc.Sheets.getByName("my sheet 1")
dim i as integer
i=Sheet.getIndex REM this not work
thank you for your help
How to find Sheet index in my sheets
How to find Sheet index in my sheets
LibreOffice 4.1.0.4 on Windows 7
Re: How to find Sheet index in my sheets
A sheet has range properties.
addr = oSheet.getRangeAddress()
sh = addr.Sheet (0 based)
sc = addr.StartColumn (always 0 for a sheet)
sr = addr.StartRow (always 0 for a sheet)
ec = addr.EndColumn (=columns.count -1)
ec = addr.EndRow (=rows.count -1)
Directly on the sheet:
=SHEET(INDIRECT("SheetName"&".A1"))
addr = oSheet.getRangeAddress()
sh = addr.Sheet (0 based)
sc = addr.StartColumn (always 0 for a sheet)
sr = addr.StartRow (always 0 for a sheet)
ec = addr.EndColumn (=columns.count -1)
ec = addr.EndRow (=rows.count -1)
Directly on the sheet:
=SHEET(INDIRECT("SheetName"&".A1"))
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: How to find Sheet index in my sheets
They are about Cells and Ranges.Villeroy wrote:A sheet has range properties.
addr = oSheet.getRangeAddress()
sh = addr.Sheet (0 based)
sc = addr.StartColumn (always 0 for a sheet)
sr = addr.StartRow (always 0 for a sheet)
ec = addr.EndColumn (=columns.count -1)
ec = addr.EndRow (=rows.count -1)
Directly on the sheet:
=SHEET(INDIRECT("SheetName"&".A1"))
LibreOffice 4.1.0.4 on Windows 7
Re: How to find Sheet index in my sheets
A sheet can be seen as a huge cell range because http://www.openoffice.org/api/docs/comm ... sheet.html includes service SheetCellRange which implements interface XCellRangeAddressable having method getRangeAddress().
[Tutorial] Introduction into object inspection with MRI
[Tutorial] Introduction into object inspection with MRI
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice