How to avoid the single quotes in text columns of excel while exporting tables from sql server 2005

  • 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.

  • 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.

  • Thankyou for the reply. Yup since its a feature i can ignore it as of now...

  • 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.

  • 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