Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
if theSelection.SupportsService("com.sun.star.sheet.SheetCell") then ' SINGLE CELL SELECTED theCell=theSelection msgbox "1/A Selected cell: " + theCell.RangeAddress.StartColumn + ":" + theCell.RangeAddress.StartRow oActiveCell = ThisComponent.getCurrentSelection() oConv = ThisComponent.createInstance("com.sun.star.table.CellAddressConversion") oConv.Address = oActiveCell.getCellAddress msgbox "1/B Cell Address: " + oConv.Address.Column + ":" + oConv.Address.Row end if if theSelection.SupportsService("com.sun.star.sheet.SheetCellRange") then ' RANGE OF CELLS SELECTED OR SINGLE CELL SELECTED msgbox "2 Selected cell in a range: " + theSelection.RangeAddress.StartColumn + ":" + theSelection.RangeAddress.StartRow + " - " + _ theSelection.RangeAddress.EndColumn + ":" + theSelection.RangeAddress.EndRow end if activeSheet = ThisComponent.getCurrentController.getActiveSheet theCell = UsedRange(activeSheet) msgbox "Used range: " + theCell.RangeAddress.StartColumn + ":" + theCell.RangeAddress.StartRow + " - " + _ theCell.RangeAddress.EndColumn + ":" + theCell.RangeAddress.EndRow + "; " + _ theCell.AbsoluteName Function UsedRange(oSheet As Variant) As Variant REM https://ask.libreoffice.org/t/looking-for-last-row-used-programmatically/26223/5 Dim oCursor As Variant oCursor = oSheet.createCursor() oCursor.gotoEndOfUsedArea(False) oCursor.gotoStartOfUsedArea(True) UsedRange = oCursor End Function
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)