By Basic Code: Get & Set color attributes
By Basic Code: Get & Set color attributes
This is a coding question. I have series of sheets dealing with student, teacher, tuition and schedule data that are all interlinked (Yes, I realize in would be better in a database, that is the next step later). One sheet is a class schedule display grid and I need various cells on this sheet to take the foreground and background colors from other cells in another sheet using Basic programming. I just need basic tips on how to pull that info from one cell and set it in another. I am sure it is fairly simple and any guidance would be appreciated.
Re: By Basic Code: Get & Set color attributes
This is the wrong forum for this type of questions. Did you notice that Calc has an extremely powerful cell function named STYLE? It can be used together with lookups to calculate all sorts of conditional formattings not limited to 3 conditions like in Format>Conditional...
http://user.services.openoffice.org/en/ ... php?id=667
http://user.services.openoffice.org/en/ ... hp?id=1003
In any case you need a set of styles.
In a script you would state:
where obj can be a cell, a range or a collection of ranges and "green_on_red" is the name of a cell style.
http://user.services.openoffice.org/en/ ... php?id=667
http://user.services.openoffice.org/en/ ... hp?id=1003
In any case you need a set of styles.
In a script you would state:
Code: Select all
obj.Style = "green_on_red"
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: By Basic Code: Get & Set color attributes
My apologies to posting in the wrong area. What would be the correct forum to post this questions and other programming question. I am rather new to this site and still trying to find my way around.
I will check out your suggestion, thanks for your help Villeroy.
I will check out your suggestion, thanks for your help Villeroy.
Re: By Basic Code: Get & Set color attributes
Board Index > Macros and UNO API
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