title: How to select two or more ranges from excel sheet with SQL Server
body: <p>Well, I have a doubt, i want to know how to select multiple information from Excel to insert in SQL Server Database.</p>
  
  <p>But i have a problem, i want to insert only the selected information like this image.</p>
  
  <p><a href="https://i.stack.imgur.com/o1ksn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/o1ksn.png" alt="Example of information"></a></p>
  
  <p>I want to select the column (A,D,E), not the C and D column, why I don't select all ? , because in the excel file the B,C,D, and E columns has the same column name, and i only want to insert the D and E column,</p>
  
  <p>I had this SQL Query, but it doesn't work, it don't select me the first column (PART NUMBER), but it select correctly the D and E Column.</p>
  
  <pre><code>SELECT * FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0',
      'Excel 8.0; Database=\\s1\files\file.xlsx;HDR=YES; IMEX=1', 
      'SELECT [PARTNUMBER] [COL1], [COL2]  FROM [EMB$D:E], [EMB$A:A] WHERE [PART NUMBER] IS NOT NULL');  
  </code></pre>