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

Select TOP N Rows missing from SSMS temporal table

Updated March 02, 2018 11:06 AM

Database Shrink task fails

Updated December 28, 2017 10:06 AM

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