title: Can we have the mapping for OleDB Source to Excel Destination at runtime rather than at design time?
body: <p>I am trying to create a SSIS package that will export csv data to an excel file. This package will be called up from C# giving the csv file as input to the package. I am quite new to SSIS and I've been able to produce the expected result with same headers.</p>
  
  <p>I went with the following approach -</p>
  
  <ol>
  <li>Script task - created scripts from the csv headers to create temp table, bulk insert, excel table scripts.</li>
  <li>Execute SQL Task - created a temp table in database</li>
  <li>Execute SQL Task - Bulk insert csv data into table</li>
  <li>Execute SQL Task - Create Excel file</li>
  <li>Data Flow Task - OleDB Source to Excel Destination</li>
  <li>Execute SQL Task - Drop the temp table created</li>
  </ol>
  
  <p>The challenge I am facing is that my csv may have different headers (both text and number of headers may be different). And I want a single package to serve this purpose.</p>
  
  <p>With the headers being different, the mapping between OleDB Souce to Excel Destination in step 5 above is not working for dynamic headers and is giving unexpected results in the excel output. Is there any way these mappings can be decided at runtime and not at design time.</p>