Scenes controlled by spreadsheet

I use a spread sheet to activate scenes based on available power from a wind turbine
Using the following links example

http://192.168.1.71:3488/data_request?id=lu_action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=1
http://192.168.1.71:3488/data_request?id=lu_action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=2
http://192.168.1.71:3488/data_request?id=lu_action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=3

I presently only use the scenes immediately without any other delays in the scenes

But I now want to use delays in the scenes that get cancelled out if a lower scene number is activated but the scene that was just activated delays to still work

Example scene 2 activates and cancels delays in scenes 3 to 10 or any scene greater than 2 if that easier I presume that some Luup code placed in each scene would do the trick or is it possible to amend the links above to do the job

Some help here would be gratefully accepted

You cannot cancel delayed scene actions once they have been triggered. I think you have two options:

Manage the delays in your existing spreadsheet macros. Trigger the sequence of scenes one at a time with the required delays until the conditions require a different sequence.

Use Program Logic Event Generator (PLEG) plugin in Vera to perform the required device actions instead of scenes. You can configure this for whatever delay logic you want. You could use VirtualSwitch or VirtualContainer plugins as a means for your spreadsheet to pass information to PLEG.