+ Reply to Thread
Results 1 to 3 of 3

Excel/Access VBA parser help

Hybrid View

  1. #1
    Registered User
    Join Date
    06-09-2011
    Location
    Prostejov, Czech Republic
    MS-Off Ver
    Excel 2010
    Posts
    5

    Excel/Access VBA parser help

    Hi all,

    pls need some advice from you how to parse the ouput I get from SAP using function module and VBA.

    Here is an example of text I get and I am able to parse using VBA correctly:
    0018:000000000081234567,0004:0001,0003:ABC,002:,001:X;0018:000000000087777777,0004:0001,0003:ABC,002:,001:X;0018:000000000087777777,0004:0001,0003:ABC,002:,001:X

    Each row is separated by semicolon delimeter
    Each column is separated by comma delimeter
    Number at the beginning - e.g. 0018 is field length

    The problem is that there are some fields that includes semicolon within column which results to incorrectly parsed fields , e.g.
    0018:000000000081234567,0004:0001,0003:A;B;C,002:,001:X;0018:000000000087777777,0004:0001,0003:ABC,002:,001:X;0018:000000000087777777,0004:0001,0003:ABC,002:,001:X

    Is there any logic I could use to parse this correctly ?
    Thank for help
    Petr

  2. #2
    Registered User
    Join Date
    06-09-2011
    Location
    Prostejov, Czech Republic
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Excel/Access VBA parser help

    fixed using regex in my code

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Excel/Access VBA parser help

    It's nice that you found your solution.

    Pls mark your thread as solved as per forum rule#9.

    Please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

+ 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