Pretty new at Open office and I've tryed searching the web but find no clear anwsers.
How does one go about reading the cells format such as color, patterns, numberic, text or date/time
Thanks
Code to read the active cells format
Code to read the active cells format
Open Office 4.1 on Windows 10
Re: Code to read the active cells format
What you want to read really: the name of the applied cell style, the propreties of the applied style or the direct formatting properties of the cells?How does one go about reading the cells format such as color, patterns, numberic, text or date/time
You can get the name of the applied style by a cell formula based on a macro code (it will not work with the stylename applied by the conditional format feature):
viewtopic.php?f=21&t=2762
viewtopic.php?t=27574
...or directly by a macro code:
Code: Select all
Dim sTyle as String
Dim oCell as Object
...
REM You must get the cell object here: the actually selected one or you can get a cpecific cell by its coordinates or by its reference/name
...
sStylename = oCell.CellStyle
And you can get/modify the properties of a specific cell:
viewtopic.php?f=25&t=41387
Tip:
Install the MRI or the XrayTool to examine programming object in your macro code.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: Code to read the active cells format
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