title: how to make sure the code is rendered to googlesheet before export pdf file?
body: <p>I created a template sheet in google sheet. I need to generate multiple pdf files with variable data based on the template.</p>
  <p>For example, I put &quot;Michael&quot; into the specific cell of the template using getRanage.Setvalu function and export the pdf file. What I need is that it would generate a pdf file with respectively variable data. However, the problem is that it is a template pdf file without the data of &quot;Michael&quot;. When I check the template sheet, it does show the &quot;Michael&quot; on the template sheet.</p>
  <p>My code is something like below.</p>
  <p><code>getRange(&quot;A1&quot;).SetValue(); genaratePdf()；</code></p>
  <p>I tried to use the timeout function, it does work. However, this is not what I want and is inefficient.</p>
  <p>My question is that if there is a way to make sure that &quot;Michael&quot; is rendered to the sheet before running the export pdf function?</p>