Results 1 to 15 of 15
  1. #1
    3 Star Lounger
    Join Date
    Mar 2006
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    289
    Thanks
    0
    Thanked 1 Time in 1 Post

    ASCII character (2003)

    Does anyone know the ASCII character for alt+enter used to wrap text in a cell?
    Thanks
    chuck

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: ASCII character (2003)

    It's Chr(10)

  3. #3
    3 Star Lounger
    Join Date
    Mar 2006
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    289
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: ASCII character (2003)

    What would be the hexidecimal equivalent?
    Thanks
    chuck

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: ASCII character (2003)

    10 decimal = 0A hexadecimal. What do you need it for? (Just curious)

  5. #5
    3 Star Lounger
    Join Date
    Mar 2006
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    289
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: ASCII character (2003)

    It will be embedded in a mainframe text file to cause certain strings of text to wrap automatically when the file is opened in Excel. That is how the programmer explained it to me.
    Thanks
    chuck

  6. #6
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: ASCII character (2003)

    Many programs have some kind of "constant" for this. it is the "LineFeed" character. In VB, for example, it is "vbLF" and using it makes the code easier to understand.

    Steve

  7. #7
    3 Star Lounger
    Join Date
    Mar 2006
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    289
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: ASCII character (2003)

    We tried 0A. 0D wrapped the text to the next cell. We need to wrap within the cell.
    Thanks
    chuck

  8. #8
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: ASCII character (2003)

    What happened with 0A?

    <img src=/S/whisper.gif border=0 alt=whisper width=29 height=17>Did you tell excel to "wrap text" [Format -cells - Alignment (tab) - Check "Wrap text:]? The default is not to wrap text

    Steve

  9. #9
    3 Star Lounger
    Join Date
    Mar 2006
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    289
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: ASCII character (2003)

    I am the middle man here so I will try to explain things as I understand them. A file is created through a mainframe program which produces a text file. The file is then given an xls extension so the recipients open it in excel. The program that produces the file is where the wrap coding needs to be. That's where 0A was tried. It produced a Z with the ^ above it. I am not writing the program. I was just boasting about Woody's Lounge and I was asked to post the question. The objective is when the tab delimited file is opened in Excel it appropiately wraps text in the cells designated in the coding.

    The recipients of these files are not "computer" literate, so you have to do everything for them.

    Thanks for thinking about this. My dedication ends in 5 minutes and LET THE WEEKEND BEGIN!!!
    Thanks
    chuck

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: ASCII character (2003)

    In order to make a tab-delimited text file with line feeds open correctly in Excel, the strings containing line feeds *must* be surrounded by quotes, otherwise the line feeds are interpreted the same as a carriage return/line feed (i.e. wrap to next cell). It doesn't hurt to surround *all* strings by quotes. So the text file should look like this, where $ represents a line feed (ASCII 10) and # represents a tab character (ASCII 9):

    "One$Two"#"Three"
    "Four"#"Five$Six"

    The user will still have to select the cells and turn on text wrapping. As Steve (sdckapr) noted, this is off by default. The result will look like this when opened in Excel:

    <table border=1><td>One
    Two</td><td valign=bottom>Three</td><td valign=bottom>Four</td><td>Five
    Six</td></table>

  11. #11
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: ASCII character (2003)

    Another option would be to use a 'special' character that you can rely on not appearing in the real data (eg a tilde), then simply do a Find/Replace when you've imported the data into Excel. Avoids having to wrap quotes around every field. You could even automate the process with a macro attached to a toolbar button.

    Cheers
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  12. #12
    3 Star Lounger
    Join Date
    Mar 2006
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    289
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: ASCII character (2003)

    "12-34-567-8912345.JOHN DOE" ."MARY SMITH.MIKE JONES" .
    7FF6FF6FFF6FFFFFFF0DDCD4CDC7407DCDE4EDCEC0DCDC4DDD CE7404444444444444444444444444
    F12034056708912345A16850465F05F4198024938A49250165 52F050000000000000000000000000

    In this string the *0A* returns Z with an inverted caret above it. The tab works as expected.
    Thanks
    chuck

  13. #13
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: ASCII character (2003)

    Sorry, you've lost me. What is the meaning of the lines of text in your reply?

  14. #14
    3 Star Lounger
    Join Date
    Mar 2006
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    289
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: ASCII character (2003)

    "12-34-567-8912345.JOHN DOE" ."MARY SMITH.MIKE JONES" .
    7FF6FF6FFF6FFFFFFF*0*DDCD4CDC74*0*7DCDE4EDCEC*0*DC DC4DDDCE74*0*4444444444444444444444444
    F12034056708912345*A*1 6 85 046 5 F0*5*F419 8 024 9 38 *A*4 92 5 0165 5 2 F0*5*0000000000000000000000000

    This is the HEX view of a string to show where the 0A and 05 characters are placed. I've added spaces to make the second and third lines line up as they are read vertically. The * is just to identify the characters. When opened in Excel the Z with the inverted caret shows up between 5 and John Doe, and between H and Mike Jones. Sorry I'm doing such a poor job communicating this. If this still makes no sense just let it go. Thanks for your time.
    Thanks
    chuck

  15. #15
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ASCII character (2003)

    The HEX you have in your message is EBCDIC, not ASCII. You are putting the X'0A' into the EBCDIC data. That must then be translated into ASCII by something, and the X'0A' is most likely not going to stay X'0A' in the ASCII string. If you are going to insert it into the EBCDIC data, then you are going to have to find out what the software that does the translation (your 3270 emulator?) will translate into X'0A' in the resulting ASCII string and insert that into the EBCDIC data.
    Legare Coleman

Posting Permissions

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