Open lapnd opened 4 years ago
@flaminestone Please, take a look
Hello @lapd-viosoft.This feature is in development and has not been documented yet. What you mean with worksheet change event? In spreadsheet editor, every cell change (or double click in any cell) will trigger this event, and I do not know any case for using this.
Hello @flaminestone In Excel, with VBA macro, we can watch the change of each cell and do further processing. For example:
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Column = 1 Then
ThisRow = Target.Row
If Target.Value > 100 Then
Range("B" & ThisRow).Interior.ColorIndex = 3
Else
Range("B" & ThisRow).Interior.ColorIndex = xlColorIndexNone
End If
End If
End Sub
Or with OfficeJs addins, we can do like this
// Register change event
Excel.run(function (context) {
var worksheet = context.workbook.worksheets.getItem("Sample");
worksheet.onChanged.add(handleChange);
return context.sync()
.then(function () {
console.log("Event handler successfully registered for onChanged event in the worksheet.");
});
}).catch(errorHandlerFunction);
function handleChange(event)
{
return Excel.run(function(context){
return context.sync()
.then(function() {
console.log("Change type of event: " + event.changeType);
console.log("Address of event: " + event.address);
console.log("Source of event: " + event.source);
});
}).catch(errorHandlerFunction);
}
In spreadsheet editor, every cell change (or double click in any cell) will trigger this event, and I do not know any case for using this.
Can you tell me how to capture this cell change event in plugin/macro or any background thread of editor?
I have scenario like:
Thank you.
Can you tell me how to capture this cell change event in plugin/macro or any background thread of editor?
It is not available now, this functional is in development.
This is example for using some available events
Hi @flaminestone Thank you very much for your information!
Is it available for now?
Hi @gamead ! These methods are still in development. Improvement request in our internal repository #58189
Hi, Thank for the great project. As we know, Microsoft Excel and OfficeJs addins allow us to listen event when a worksheet and/or a cell changed. Is there anyway to listen these change events with OnlyOffice via plugin/macro? Thank you!