How to write intermediate solutions to excel instantaneously when they are found.

In general CP solves the problem and post process the final solution to excel but how to write the intermediate solutions to excel before complete solving and that write should be dynamic not post process.

Explaining this with an example would be very helpful. Thanks in advance.....