SQL Server: SSMS "Save Results As" creates CSV that excel mangles

by samsmith   Last Updated November 14, 2017 17:06 PM

Using the Save Results As option, shown below. CSV looks good!

But when Excel opens/imports it:

  • Long strings are mangled as numbers (if the data is largely numeric)
  • Dates are not detected properly
  • My users beef about all this

How do I get a query to a clean excel file without dancing? (We like everything to actually in the SQL file itself... I wish we could do "SELECT INTO FILE:C:\SQLOUTPUT\DATA.XLS ...")

enter image description here

Tags : sql-server ssms


Related Questions


Hide tables from SSMS Intellisense

Updated October 26, 2017 22:06 PM

SSMS Database Node Refresh causes Restore to Fail

Updated April 06, 2015 21:02 PM