+ Reply to Thread
Results 1 to 5 of 5

Parse a String and detect ALT-ENTER?

  1. #1
    Registered User
    Join Date
    06-26-2009
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    21

    Question Parse a String and detect ALT-ENTER?

    Heres my problem: I will have a cell that has company names in it and I need to parse each name an then do some work with them but when I started this project I was told each company will be seperated by some number of spaces.
    Ex.) |Company1(534553) Company2(3544)|
    Right now this is how I'm parsing a line like this:
    Please Login or Register  to view this content.
    So it will make an array where each block will hold either a company name or a null (because of multiple spaces beside eachother) and I filter that out later.

    Now Im being told there is data that is being seperated by, what is essentialy an Enter stroke (Done by pressing Alt-Enter in Excel). This kind of messed up my whole parsing plan.

    Firstly how do I detect this Alt-Enter character so I can deal with it, and also is there a way to have code as simple as I have above but will execute under multiple conditions?

    What I mean is that i want it to parse into the same array when it hits a SPACE or Alt-Enter. Like using the Split Function but with more than 1 condition?

    Thank You
    Last edited by KroogerFx; 07-16-2009 at 12:27 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Parse a String and detect ALT-ENTER?

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    06-26-2009
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    21

    Smile Re: Parse a String and detect ALT-ENTER?

    shg you are a life saver thank you very much

  4. #4
    Registered User
    Join Date
    07-31-2009
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: how to implement ALT-ENTER functionality in excel export

    I am showing the data into a datagrid in multiline using <br> tag and its displaying the fine content. like

    a
    b
    c
    d

    Now I want to export the same content into the execl then its displaying the <br/> tag during excel export. something like this
    a<br/>b<br/>c<br/>d<br/>

    I tried several option like replace <br/> with "\r\n", "\n" etc but not working.

    Can u suggest me the alternative option so that I can implement this export functionality with alt+enter kind of thing.. any suggestion will be of a great help. thanks in advance!

    Thank You[/QUOTE]

  5. #5
    Forum Contributor
    Join Date
    02-23-2006
    Location
    Near London, England
    MS-Off Ver
    Office 2003
    Posts
    770

    Re: Parse a String and detect ALT-ENTER?

    tarunsoodrnd
    You need to start your own thread, not hijack someone elses, (which incidently has now be marked as solved, so no-one will see your question anyway!)
    If you find the response helpful please click the scales in the blue bar above and rate it
    If you don't like the response, don't bother with the scales, they are not for you

+ 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