January 28, 2012 at 12:24 pm
Hi, I am exporting a table to excel which has
text and numeric values using the sql server
import and export wizard. When i do that the
text columns in excel have a single quote as
first character in every cell. I also tried find
and replace in excel, but it didnt fix the
issue. How can we avoid the single quotes while
exporting from sql server 2005?
Any suggestions would be greatly appreciated.
January 28, 2012 at 5:27 pm
A single quote at the start of a cell is used to force text format. This is necessary to prevent unintended conversion of values that could be interpreted as numeric, e.g., '12e3' or '12/3'.
In Excel worksheet you do not see the single quote displayed in a cell, only in the edit field.
January 28, 2012 at 11:07 pm
Thankyou for the reply. Yup since its a feature i can ignore it as of now...
January 29, 2012 at 6:39 am
Just for curiosity, did you open the CSV file in notepad or some text editor? IIRC Excel won’t show the single quotes but text editors will do.
January 29, 2012 at 9:05 am
Dev (1/29/2012)
Just for curiosity, did you open the CSV file in notepad or some text editor? IIRC Excel won’t show the single quotes but text editors will do.
This is also by design: CSV with values delimited by quotes is a native Excel format - Excel will save a file with these delimiters.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply