Friday, October 5, 2012

Copy SQL to Excel Missing Rows


Issue:

When you try to copy rows from SQL server and paste into Excel but experience missing rows either by right clicking and coping with headers or saving as a CSV.

Solution:

The problem is double quotes "

Excel will skip all rows in between the start and end of a double quotes.

1) Either trim off the quotes in SQL

or

2) Right click and save as text, tab delimited, from SQL and then open in Excel using the default workflow selections during import.

4 comments:

  1. Thanks! Would have taken forever for me to figure out and this is the only thread I could find on this.

    ReplyDelete
  2. Two thumbs up for finding this needle in a Hay Stack!

    ReplyDelete
  3. This is a great workaround, but when you save to file it doesn't save the headers. Is there a trick for that?
    Thanks!

    ReplyDelete
  4. Thanks. I helped me a lot.

    ReplyDelete