There is a for loop in my code to go through each data file, and codes to analyze the data(plotting graphs), and then add graphs to the doc file. The doc file always contains previous data's analysis results(the graphs), which isn't what i want. I want the doc file just contains one data's files analysis result. But i don't know the reason. Asking for help? Thanks.
It's difficult to answer without seeing your code snippet. However, I suspect that you create the doc file outside your for loop. So, after each iteration, you add graphs to the old doc file?
You probably need to create a new doc file inside your for loop.