Copying from Excel adds quotes to pasted values

This is a problem that had me stumped for a moment today until I searched and found the answer.
I was using Excel functions to generate SQL INSERT scripts in Excel for a database import.
It was working fine until suddenly each cell I copied from Excel pasted with a double-quote (“) around the value.
The first answer to my Google search made we realise the problem: I’d added a line-break in the middle of my formula to help while I was constructing a SQL query.
It turns out when you add line breaks to cells in Excel, copied values are surrounded by quotes.
This actually makes sense when you think about it (think about it in the context of working with CSV files). It just didn’t occur to me because I’d never encountered them in this context.
Remove the line break and no more quotes being added to the copied values.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.