I'm using COM interop in C# to display data into an Excel spreadsheet. Assume I have a data structure for 'Student Details' in C# and this is displayed appropriately in Excel.
Now, is it possible to change that value of a particular variable in C# when the corresponding cell in Excel is edited?
For example, as soon as the the marks of Student x is altered in the Excel sheet the variable corresponding to marks in C# must be altered.
If required VBA code could also be used! I don't know whether such a thing is possible, but it would be great if I could find an answer here.
Here's an example of how you can do that with an event handler:
The VBA equivalent of this would be in the Worksheet's module: