Single Quote Problem in Excel to Export

Ask a Question related to ASP.NET Data Grid Control, Design and Development.

  1. #1

    Default Single Quote Problem in Excel to Export

    Hi,

    We have to export our data in sql server table to any excel sheet. We have a
    template to export, using oledb we are inserting rows to this template and
    generating the excel output.

    The problem here is we are getting a single quote extra in front of each
    cell. can anyone help us in clearing this kind of an issue.

    we tried sending some static strings to some columns on for taking from sql
    server eventhen we are getting the same


    Its Urgent, Please reply ASAP,
    Prasad Dannani



    Prasad Dannani Guest

  2. Similar Questions and Discussions

    1. Single & Double Quote Problem in Database Insert/Update
      Hello, I have a textarea on a form where users are able to enter text wrapped in 'single' and "double" quotes. However, when I insert or update...
    2. SQL insert/update problem if coldfusion field value has single quote
      On the coldfusion form, if the user enter the data with single quote in a field (e.g. Joe's Party), and performs SQL insert or update statements,...
    3. Export to excel problem
      Hi All, I don't know why my program exports to excel which can't convert cell format ? for example, I am using the following code:...
    4. double single quote problem in cfquery
      Hi, i've this problem with ColdFusion MX 6.1 Updater and MX 7 If i try to insert a text containing a single quote (for example TEST') all works...
    5. Queries Of Queries Single Quote Problem
      When using queries of queries I'm having the following issue. Select Company_ID From qry_MyQuery Where Company_NM = 'MyString''s' <----...
  3. #2

    Default Re: Single Quote Problem in Excel to Export

    That's how excel forces data to be a string. You will have to write code to
    remove it. Or you can set the cell to a date type or some other relevant
    type to get rid of the quote character.

    --
    Regards,
    Alvin Bruney [MVP ASP.NET]

    [Shameless Author plug]
    The Microsoft Office Web Components Black Book with .NET
    Now Available @ [url]www.lulu.com/owc[/url]
    Forth-coming VSTO.NET - Wrox/Wiley 2006
    -------------------------------------------------------



    "Prasad Dannani" <prasad@pennywise.com> wrote in message
    news:ukF#CRl2FHA.1396@TK2MSFTNGP15.phx.gbl...
    > Hi,
    >
    > We have to export our data in sql server table to any excel sheet. We have
    a
    > template to export, using oledb we are inserting rows to this template and
    > generating the excel output.
    >
    > The problem here is we are getting a single quote extra in front of each
    > cell. can anyone help us in clearing this kind of an issue.
    >
    > we tried sending some static strings to some columns on for taking from
    sql
    > server eventhen we are getting the same
    >
    >
    > Its Urgent, Please reply ASAP,
    > Prasad Dannani
    >
    >
    >

    Alvin Bruney - ASP.NET MVP Guest

  4. #3

    Default Re: Single Quote Problem in Excel to Export

    We tried by specify the datatype to the oledb parameters, We tried to find
    that charecter in the string which are retreive from sql server but it was
    not there and then we removed the first charecter and tried then we also
    tried by hardcoding the values to one or two columns. We tried by specfying
    the datatype to text in the excel template.

    None of the above are worked. If there is any otherway to remove it then
    please inform us.

    "Alvin Bruney - ASP.NET MVP" <www.lulu.com/owc> wrote in message
    news:eSy1a5l2FHA.3704@TK2MSFTNGP10.phx.gbl...
    > That's how excel forces data to be a string. You will have to write code
    to
    > remove it. Or you can set the cell to a date type or some other relevant
    > type to get rid of the quote character.
    >
    > --
    > Regards,
    > Alvin Bruney [MVP ASP.NET]
    >
    > [Shameless Author plug]
    > The Microsoft Office Web Components Black Book with .NET
    > Now Available @ [url]www.lulu.com/owc[/url]
    > Forth-coming VSTO.NET - Wrox/Wiley 2006
    > -------------------------------------------------------
    >
    >
    >
    > "Prasad Dannani" <prasad@pennywise.com> wrote in message
    > news:ukF#CRl2FHA.1396@TK2MSFTNGP15.phx.gbl...
    > > Hi,
    > >
    > > We have to export our data in sql server table to any excel sheet. We
    have
    > a
    > > template to export, using oledb we are inserting rows to this template
    and
    > > generating the excel output.
    > >
    > > The problem here is we are getting a single quote extra in front of each
    > > cell. can anyone help us in clearing this kind of an issue.
    > >
    > > we tried sending some static strings to some columns on for taking from
    > sql
    > > server eventhen we are getting the same
    > >
    > >
    > > Its Urgent, Please reply ASAP,
    > > Prasad Dannani
    > >
    > >
    > >
    >
    >

    Prasad Dannani Guest

  5. #4

    Default Re: Single Quote Problem in Excel to Export

    We tried all possible combinations and finally able to find that the problem
    is there in the excel template i specified the cells format type to text
    then it worked properly.



    "Prasad Dannani" <prasad@pennywise.com> wrote in message
    news:%237myn%23l2FHA.1276@TK2MSFTNGP09.phx.gbl...
    > We tried by specify the datatype to the oledb parameters, We tried to find
    > that charecter in the string which are retreive from sql server but it was
    > not there and then we removed the first charecter and tried then we also
    > tried by hardcoding the values to one or two columns. We tried by
    specfying
    > the datatype to text in the excel template.
    >
    > None of the above are worked. If there is any otherway to remove it then
    > please inform us.
    >
    > "Alvin Bruney - ASP.NET MVP" <www.lulu.com/owc> wrote in message
    > news:eSy1a5l2FHA.3704@TK2MSFTNGP10.phx.gbl...
    > > That's how excel forces data to be a string. You will have to write code
    > to
    > > remove it. Or you can set the cell to a date type or some other relevant
    > > type to get rid of the quote character.
    > >
    > > --
    > > Regards,
    > > Alvin Bruney [MVP ASP.NET]
    > >
    > > [Shameless Author plug]
    > > The Microsoft Office Web Components Black Book with .NET
    > > Now Available @ [url]www.lulu.com/owc[/url]
    > > Forth-coming VSTO.NET - Wrox/Wiley 2006
    > > -------------------------------------------------------
    > >
    > >
    > >
    > > "Prasad Dannani" <prasad@pennywise.com> wrote in message
    > > news:ukF#CRl2FHA.1396@TK2MSFTNGP15.phx.gbl...
    > > > Hi,
    > > >
    > > > We have to export our data in sql server table to any excel sheet. We
    > have
    > > a
    > > > template to export, using oledb we are inserting rows to this template
    > and
    > > > generating the excel output.
    > > >
    > > > The problem here is we are getting a single quote extra in front of
    each
    > > > cell. can anyone help us in clearing this kind of an issue.
    > > >
    > > > we tried sending some static strings to some columns on for taking
    from
    > > sql
    > > > server eventhen we are getting the same
    > > >
    > > >
    > > > Its Urgent, Please reply ASAP,
    > > > Prasad Dannani
    > > >
    > > >
    > > >
    > >
    > >
    >
    >

    Prasad Dannani Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139