Skip to content

Instantly share code, notes, and snippets.

@PatrickMcDonald
Created February 26, 2015 16:30
Show Gist options
  • Save PatrickMcDonald/a427d9f7290d01101a26 to your computer and use it in GitHub Desktop.
Save PatrickMcDonald/a427d9f7290d01101a26 to your computer and use it in GitHub Desktop.
Import columns with mixed datatypes to SQL Server from Excel
SELECT *
FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0',
'Excel 8.0;IMEX=1;Database=\\server\share\Spreadsheet.xlsx;', ['Sheet-Name$'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment