Edit: Not exactly solved but I didn't undertand there always was a selected cell on a sheet. |
[Solved] Deselecting a cell in Calc
[Solved] Deselecting a cell in Calc
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?
Last edited by Bastien on Fri Mar 15, 2019 1:26 pm, edited 1 time in total.
LibreOffice 6.2.3.2 on Ubuntu 19.04
Re: Deselecting a cell in Calc
Select an empty collection of cells.
Code: Select all
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 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Deselecting a cell in Calc
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.2.3.2 on Ubuntu 19.04
Re: Deselecting a cell in Calc
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 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice