title: Copy macro in a template file with Apache POI?
body: <p>My problem:</p>
  
  <p>I have two workbooks. </p>
  
  <p>Workbook1: constructed from a template file with macro</p>
  
  <p>Workbook2: empty</p>
  
  <p>In a loop I export my datastructures. In each loop passing I copy the template to wokrbook2 and then write the data in it, mark the row where I was for the next loop passing, and then do the same again.</p>
  
  <p>At the end I have copied the template multiple times ( as many times as I have datasets) to the workbook2 and written data in the according template.</p>
  
  <p>My problem: There is a macro in the original template file which is gone when I open my newly created file. All the data is correctly written, just the macro functionality is missing.</p>