I am performing an iterative optimization using the main function in CPLEX OPL. After each iteration, I want to write the values of the decision variables to an Excel sheet. The optimization runs for 100 iterations, and the variable x has a size of 100×96 (i.e., x[1..100][1..96]). While I am writing the variable values to an Excel sheet, I noticed that the values from the last iteration are not being saved. Currently, I am using a .dat file for this process. How can I ensure the values from all iterations, including the final one, are correctly written to Excel?