Help me find an analog of Excel range property:
Property Characters ([Start], [Length]) As Characters
in order to change the color of individual characters with a macro.
[Solved] Calc cell: Characters property from Excel
[Solved] Calc cell: Characters property from Excel
Last edited by MrProgrammer on Sat Jan 23, 2021 10:05 pm, edited 4 times in total.
Reason: Tagged ✓ [Solved]
Reason: Tagged ✓ [Solved]
Ubuntu 18.04 LTS • LibreOffice 7.5.3.2 Community
Re: Calc cell characters
The cell supports interface com.sun.star.text.XTextRange as shown by the MRI extension.
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: Calc cell characters
Need a usage example. I can't figure out how to find and extract the substring.
@Villeroy, please show me how to work with the getText(), getStart(), and getEnd() methods. Read-only. And setString().
@Villeroy, please show me how to work with the getText(), getStart(), and getEnd() methods. Read-only. And setString().
Ubuntu 18.04 LTS • LibreOffice 7.5.3.2 Community
Re: Calc cell characters
I don't know. If I ever had to do that (luckily I don't have to), I would start MRI and read
https://wiki.openoffice.org/wiki/Docume ... _Documents
https://wiki.openoffice.org/wiki/Docume ... _Documents
https://wiki.openoffice.org/wiki/Docume ... _Documents
https://wiki.openoffice.org/wiki/Docume ... _Documents
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: [Solved] Calc cell: Characters property from Excel
This is only a relic of the original thread. The subject was changed, and most of the posts vanished.
Now the thread is tagged SOLVED despite the fact that there is no solution.
There couldn't be a solution in the full sense since a property delivering the information asked for doesn't exist.
However, the deleted posts contained two workarounds: One by Villeroy using a Python script, and one by myself using the Calc function REGEX() available in LibreOffice V 6.2.0 or higher calling it in a macro via FunctionAccess. Both these workarounds were restricted to cases where the findings of a search (which actually were the ranges the question mentioned) did not include (parts of) the string-representation of a TextField.
Now the thread is tagged SOLVED despite the fact that there is no solution.
There couldn't be a solution in the full sense since a property delivering the information asked for doesn't exist.
However, the deleted posts contained two workarounds: One by Villeroy using a Python script, and one by myself using the Calc function REGEX() available in LibreOffice V 6.2.0 or higher calling it in a macro via FunctionAccess. Both these workarounds were restricted to cases where the findings of a search (which actually were the ranges the question mentioned) did not include (parts of) the string-representation of a TextField.
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
---
Lupp from München
- MrProgrammer
- Moderator
- Posts: 4906
- Joined: Fri Jun 04, 2010 7:57 pm
- Location: Wisconsin, USA
Re: [Solved] Calc cell: Characters property from Excel
The topic was split because the OP asked a second question (about RegEx) after the original one was solved. Forum policy is one subject per topic. The later posts, including those you mentioned, are in Does LO have a RegEx object?Lupp wrote:This is only a relic of the original thread. The subject was changed, and most of the posts vanished.
The split topic says the original question was solved:Lupp wrote:Now the thread is tagged SOLVED despite the fact that there is no solution.
Unfortunately the forum software does not allow a user's post to be split in the middle of it. I would have preferred for that sentence to remain with the original topic and the split topic to begin with the next "Another question …" sentence. But this isn't possible, nor is it possible to duplicate the post so I can put one in each topic. I suppose I could put that in my own post, but forum moderation is enough work when user's don't start new topics appropriately.eeigor, indicating topic was solved wrote:With that it is more or less clear.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).
Re: [Solved] Calc cell: Characters property from Excel
I'll be more careful in the future.
Ubuntu 18.04 LTS • LibreOffice 7.5.3.2 Community
Re: [Solved] Calc cell: Characters property from Excel
Here is a sample file that show you how to colorize letters individually by a macro in a Calc Cell (created and tested in LibreOffice):
viewtopic.php?f=7&t=77844
viewtopic.php?f=7&t=77844
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: [Solved] Calc cell: Characters property from Excel
Looks mesmerizing...
Ubuntu 18.04 LTS • LibreOffice 7.5.3.2 Community