+ Reply to Thread
Results 1 to 9 of 9

break line in text cell from ASP

  1. #1
    Lorenzo
    Guest

    break line in text cell from ASP

    hi to all, sorry for my little little english.

    i wont to export in excel from sql by asp

    if in a field there is a chr(13), excel send to new row the text. What i do
    to tell excel go in a new line in the same cell?

    i try so but don't work:

    strXls = strXls & replace(fld.value,vbCrLf,Chr(10))

    many thanks

    Lorenzo



  2. #2
    Dave Peterson
    Guest

    Re: break line in text cell from ASP

    I don't speak the ASP, but maybe....

    strXls = strXls & replace(fld.value,vbCr,vblf)

    or

    strXls = strXls & replace(fld.value,char(13),Chr(10))

    Without knowing what strXLS or fld.value is, either.

    Lorenzo wrote:
    >
    > hi to all, sorry for my little little english.
    >
    > i wont to export in excel from sql by asp
    >
    > if in a field there is a chr(13), excel send to new row the text. What i do
    > to tell excel go in a new line in the same cell?
    >
    > i try so but don't work:
    >
    > strXls = strXls & replace(fld.value,vbCrLf,Chr(10))
    >
    > many thanks
    >
    > Lorenzo


    --

    Dave Peterson

  3. #3
    Lorenzo
    Guest

    Re: break line in text cell from ASP

    Thank You!
    Unfortunately in the same case excel break text cel in a new row.

    > Without knowing what strXLS or fld.value is, either.


    strXls, is a variable that contain the output in excel
    fld.value, is the value of a field of db that can contain some break line
    and i must send it in a unique cel

    sorry again for my english

    Lorenzo


    "Dave Peterson" <[email protected]> ha scritto nel messaggio
    news:[email protected]...
    >I don't speak the ASP, but maybe....
    >
    > strXls = strXls & replace(fld.value,vbCr,vblf)
    >
    > or
    >
    > strXls = strXls & replace(fld.value,char(13),Chr(10))
    >
    > Without knowing what strXLS or fld.value is, either.
    >
    > Lorenzo wrote:
    >>
    >> hi to all, sorry for my little little english.
    >>
    >> i wont to export in excel from sql by asp
    >>
    >> if in a field there is a chr(13), excel send to new row the text. What i
    >> do
    >> to tell excel go in a new line in the same cell?
    >>
    >> i try so but don't work:
    >>
    >> strXls = strXls & replace(fld.value,vbCrLf,Chr(10))
    >>
    >> many thanks
    >>
    >> Lorenzo

    >
    > --
    >
    > Dave Peterson




  4. #4
    Dave Peterson
    Guest

    Re: break line in text cell from ASP

    How are you sending that value to excel?

    If you're just plopping that value into the cell, I would think it would work
    ok:

    xlApp.workbooks("someworkbook").worksheets("someworksheet").range("a1").value _
    = strXls

    If you're relying on windows pasting the value, then maybe you could substitute
    a different (unique) string (|) and then change that to alt-enter (char(10)).



    Lorenzo wrote:
    >
    > Thank You!
    > Unfortunately in the same case excel break text cel in a new row.
    >
    > > Without knowing what strXLS or fld.value is, either.

    >
    > strXls, is a variable that contain the output in excel
    > fld.value, is the value of a field of db that can contain some break line
    > and i must send it in a unique cel
    >
    > sorry again for my english
    >
    > Lorenzo
    >
    > "Dave Peterson" <[email protected]> ha scritto nel messaggio
    > news:[email protected]...
    > >I don't speak the ASP, but maybe....
    > >
    > > strXls = strXls & replace(fld.value,vbCr,vblf)
    > >
    > > or
    > >
    > > strXls = strXls & replace(fld.value,char(13),Chr(10))
    > >
    > > Without knowing what strXLS or fld.value is, either.
    > >
    > > Lorenzo wrote:
    > >>
    > >> hi to all, sorry for my little little english.
    > >>
    > >> i wont to export in excel from sql by asp
    > >>
    > >> if in a field there is a chr(13), excel send to new row the text. What i
    > >> do
    > >> to tell excel go in a new line in the same cell?
    > >>
    > >> i try so but don't work:
    > >>
    > >> strXls = strXls & replace(fld.value,vbCrLf,Chr(10))
    > >>
    > >> many thanks
    > >>
    > >> Lorenzo

    > >
    > > --
    > >
    > > Dave Peterson


    --

    Dave Peterson

  5. #5
    Tim Williams
    Guest

    Re: break line in text cell from ASP

    How are you exporting to Excel ?

    As tab-delimited, as HTML table, via Excel automation.... ?

    --
    Tim Williams
    Palo Alto, CA


    "Lorenzo" <.> wrote in message news:[email protected]...
    > hi to all, sorry for my little little english.
    >
    > i wont to export in excel from sql by asp
    >
    > if in a field there is a chr(13), excel send to new row the text. What i do
    > to tell excel go in a new line in the same cell?
    >
    > i try so but don't work:
    >
    > strXls = strXls & replace(fld.value,vbCrLf,Chr(10))
    >
    > many thanks
    >
    > Lorenzo
    >
    >




  6. #6
    Lorenzo
    Guest

    Re: break line in text cell from ASP

    As tab-delimited


    "Tim Williams" <timjwilliams at gmail dot com> ha scritto nel messaggio
    news:[email protected]...
    > How are you exporting to Excel ?
    >
    > As tab-delimited, as HTML table, via Excel automation.... ?
    >
    > --
    > Tim Williams
    > Palo Alto, CA




  7. #7
    Lorenzo
    Guest

    Re: break line in text cell from ASP



    "Dave Peterson" <[email protected]> ha scritto nel messaggio
    news:[email protected]...
    > How are you sending that value to excel?


    I build an xls file as tab-delimited


    > If you're relying on windows pasting the value, then maybe you could
    > substitute
    > a different (unique) string (|) and then change that to alt-enter
    > (char(10)).
    >


    i can't sobstitute after file creation, it is send to web client



  8. #8
    Dave Peterson
    Guest

    Re: break line in text cell from ASP

    If you're building a tab delimited file, then I think you're going to have to
    find a different way.

    Excel will see those alt-enters as new lines and import that data into a new
    row.



    Lorenzo wrote:
    >
    > "Dave Peterson" <[email protected]> ha scritto nel messaggio
    > news:[email protected]...
    > > How are you sending that value to excel?

    >
    > I build an xls file as tab-delimited
    >
    > > If you're relying on windows pasting the value, then maybe you could
    > > substitute
    > > a different (unique) string (|) and then change that to alt-enter
    > > (char(10)).
    > >

    >
    > i can't sobstitute after file creation, it is send to web client


    --

    Dave Peterson

  9. #9
    Lorenzo
    Guest

    Re: break line in text cell from ASP

    Ok. Thank you for your answers and your patience.

    bye
    Lorenzo


    "Dave Peterson" <[email protected]> ha scritto nel messaggio
    news:[email protected]...
    > If you're building a tab delimited file, then I think you're going to have
    > to
    > find a different way.
    >
    > Excel will see those alt-enters as new lines and import that data into a
    > new
    > row.
    >
    >
    >
    > Lorenzo wrote:
    >>
    >> "Dave Peterson" <[email protected]> ha scritto nel messaggio
    >> news:[email protected]...
    >> > How are you sending that value to excel?

    >>
    >> I build an xls file as tab-delimited
    >>
    >> > If you're relying on windows pasting the value, then maybe you could
    >> > substitute
    >> > a different (unique) string (|) and then change that to alt-enter
    >> > (char(10)).
    >> >

    >>
    >> i can't sobstitute after file creation, it is send to web client

    >
    > --
    >
    > Dave Peterson




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1