title: Transferring Excel data into SQL table with different columns
body: <p>I want user to transfer data from Excel files into SQL using a C# WinForms application one file at a time. The Excel files consist of similar columns, and so there might be some new columns or columns absent. Row data will vary.</p>
  
  <p>For example:</p>
  
  <p><strong>Excel file 1:</strong> Name, City State<br>
  <strong>Excel file 2:</strong> Name, City, Zip<br>
  <strong>Excel file 3:</strong> Name, City, County</p>
  
  <p>In my existing SQL table I have columns: Name, City, Population, Schools</p>
  
  <p>How do I insert the new Excel files with similar column names into an existing SQL database?</p>
  
  <p>My thought so far is to copy the new Excel file data into temporary tables, and then insert that into the existing SQL table. The problem is, I don't know how to write C# code (or a SQL query) that would insert new Excel data with more or less columns than the existing SQL table.</p>