title: Import Excel sheet into SQL Server through file upload in asp.net
body: <p>I am designing for a requirement which would provide user with an asp.net upload control to upload excel file(xls/xlsx/any advanced format) and load this excel data to SQL server 2008 data table with custom column mapping. </p>
  
  <p>On internet I have found many blogs to implement this functionality using Jet OLEDB provider but there are some limitation to this functionality as below - </p>
  
  <ol>
  <li><p>The data is truncated for the data after first few rows in the table - Reasone is Jet provider checks initial few rows to decide on the data type and its size. Resolution that I found for this is go to Registry and change the value for "TypeGuessRows". My question is - Is this advisable to do this on the web server in case of asp.net application</p></li>
  <li><p>Unicode characters does not get imported correctly - This issue can be resolved by changing the connection string to add "CharacterSet=65001;" as per link <a href="https://stackoverflow.com/questions/5794072/microsoft-jet-oledb-4-0-converting-characters">UnicodeCharacters</a></p></li>
  </ol>
  
  <p>Again question is whether this would be advisable and full proof solution.</p>
  
  <p>What is the best way to implement Import Excel to SQL Server 2008 for huge data intensive excel to be imported to Database without loosing any data and unicode characters?? The solution should be compatible with Excel 2003/2007/2010/2013.</p>