[Solved] Conditional Formatting not updating

Discuss the spreadsheet application
Post Reply
wibblewobble
Posts: 9
Joined: Tue Dec 18, 2012 8:51 am

[Solved] Conditional Formatting not updating

Post by wibblewobble »

G'day members of my favourite office software.

I'm having an issue with a conditional formatting function I'm using to highlight a cell based on the currect time.
It works fine when I first open the document but doesn't update unless I open the conditional formatting and view it.

AND(MOD(NOW();1)>=TIME(16;0;0);MOD(NOW();1)<TIME(16;30;0))

This is an example of the code I'm using which might be the issue if certain functions in it don't update?

I also have left on the auto calc in tools->cell contents

Any ideas?

*edit* I just read the help information on the NOW function and found out that it only recalculates everytime a cell is modified which is a pitty as I was after a timetable to run in the background which updated on it's own every 30 minutes. Perhaps there is still a way to achieve this?
Last edited by wibblewobble on Tue Dec 18, 2012 11:52 am, edited 1 time in total.
OpenOffice 3.4.1 on Windows 7 / XP
eremmel
Posts: 1080
Joined: Tue Dec 30, 2008 1:15 am

Re: [Issue] Conditional Formatting not updating

Post by eremmel »

I can not imagine that this is an issue, but it is by design unless you want to spent a large number of CPU cycles on this. You might solve it by hand by forcing a re-calculation of the sheet. You might also be able to write a macro that triggers the recalculation, but I guess that this macro can not be written in AOO Basic for its execution is not in another thread (it blocks UI during execution). So you need to do something smart with Java or other API that supports multi-threading. But that brings you to the second issue, is AOO designed to work multi-threaded. Some parts may others not...

The only 'trick' I can think of, it to find a way to relate your conditional formatting to all cells involved in your sheet, so that the calculation is triggered each time you change something. This might e.g. happen when you add a dummy calculation like 'COUNTA(A1:ZZ300)*0' to your conditional formatting formula.


See next post...

P.S.
I vote for not calling this an [Issue] and removing the flame icon.
Last edited by eremmel on Tue Dec 18, 2012 12:04 pm, edited 1 time in total.
It's Microsoft marketing that tells you computers are qualified for non-technicians
W11 22H2 (build 22621), LO 7.4.2.3(x64)
User avatar
Villeroy
Volunteer
Posts: 31365
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: [Issue] Conditional Formatting not updating

Post by Villeroy »

Edit, clear, delete, insert some cells. Any change updates the conditional formatting.
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
Post Reply