title: SSIS C# OpenXML to generate Excel File Failing
body: <p>I am using OpenXML to generate Excel file using C# in an SSIS package.</p>
  
  <p>I did this because we do not have Excel installed on the Server so this should work without needing Excel installed.</p>
  
  <p>This works locally, but is failing when moving to the PROD server.  It is failing on the script task and I am getting this error:</p>
  
  <pre><code>Executed as user: MI\SQLAgentAccount. Microsoft (R) SQL Server Execute     Package Utility  Version 11.0.5058.0 for 64-bit  Copyright (C) Microsoft Corporation. All rights reserved.    Started:  10:46:49 AM  Error: 2015-10-15 10:46:50.49     Code: 0x00000001     Source: Save To Excel Without Excel      Description: Exception has been thrown by the target of an invocation.  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  10:46:49 AM  Finished: 10:46:50 AM  Elapsed:  0.827 seconds.  The package execution failed.  The step failed.
  </code></pre>
  
  <p>I am including in the references the OpenXML and WindowBase objects and adding them with the "using" statements.</p>
  
  <pre><code>using DocumentFormat.OpenXml;
  using DocumentFormat.OpenXml.Packaging;
  using DocumentFormat.OpenXml.Spreadsheet;
  </code></pre>
  
  <p>Do these need to be registered with the GAC?  Or is there a way to include them in the project (inside the script task within SSIS)?  There is the setting for "Copy To Local" inside the C# script task in SSIS, but not sure what/how this would work inside SSIS.</p>
  
  <p>Any help would be appreciated.</p>