[Solved] Deselecting a cell in Calc

Keyboard macros or custom scripts

[Solved] Deselecting a cell in Calc

Postby Bastien » Fri Mar 08, 2019 11:34 am

At the end of my macro execution, I got a cell selected. Is it possible to deselect it? Or should I select a cell beyond the visible part of the sheet?

 Edit: Not exactly solved but I didn't undertand there always was a selected cell on a sheet. 
Last edited by Bastien on Fri Mar 15, 2019 1:26 pm, edited 1 time in total.
LibreOffice 6.1.1.2 on Ubuntu 18.04
Bastien
 
Posts: 38
Joined: Mon May 12, 2014 2:45 pm

Re: Deselecting a cell in Calc

Postby Villeroy » Fri Mar 08, 2019 12:50 pm

Select an empty collection of cells.
Code: Select all   Expand viewCollapse view
cells = ThisComponent.createInstance("com.sun.star.sheet.SheetCellRanges")
ThisComponent.CurrentController.select(cells)
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 26389
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Deselecting a cell in Calc

Postby Bastien » Fri Mar 08, 2019 6:01 pm

Thanks but it doesn't drop the selection. I still have a selected cell over the image I just inserted which is not very nice, but it doesn't matter. I'll look at it later.
LibreOffice 6.1.1.2 on Ubuntu 18.04
Bastien
 
Posts: 38
Joined: Mon May 12, 2014 2:45 pm

Re: Deselecting a cell in Calc

Postby Villeroy » Fri Mar 08, 2019 7:11 pm

There is always one active cell on a sheet.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 26389
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany


Return to OpenOffice Basic, Python, BeanShell, JavaScript

Who is online

Users browsing this forum: Google [Bot] and 4 guests