title: NPOI corrupting xlsm workbook
body: <p>I am required to write some data into an macro enabled workbook which was developed in 1998, i am using NPOI dotnet core library for this task. I am able to write the values into the excel correctly, however i am seeing that alignment and formatting of the sheets is lost. Screenshots below:</p>
  
  <p>First one shows the file after open the file using NPOI and downloading the same, and second shows the file when it is locally opened.</p>
  
  <p><a href="https://i.stack.imgur.com/HCUw5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HCUw5.png" alt="after download"></a></p>
  
  <p><a href="https://i.stack.imgur.com/ILmf7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ILmf7.png" alt="when the file is opened locally"></a></p>
  
  <p>below is the code i am using</p>
  
  <pre><code>public XSSFWorkbook OpenExcelFile(string filePath, string tempSavePath)
          {
              using (var stream = new FileStream(tempSavePath, FileMode.OpenOrCreate, FileAccess.ReadWrite))
              {
                  var temphssfwb = new XSSFWorkbook(OPCPackage.Open(filePath));
                  temphssfwb.Write(stream);
              }
              XSSFWorkbook hssfwb;
              hssfwb = new XSSFWorkbook(OPCPackage.Open(tempSavePath));
              hssfwb.CreateSheet("casevalidationsheet");
              return hssfwb;
          }
  </code></pre>
  
  <p>Can someone please help me understand why NPOI is ruining the alignment of my excel workbook?</p>