greycoin Posted October 27, 2011 Report Share Posted October 27, 2011 Hello all, thank you for taking the time to read and/or reply! I have been charged with writing a macro that will parse a somewhat messy text file automatically generated by a program in search of a few values. All of the fields are listed first, i.e.: “Invoice Number Payment Delivery Method Expiration Date etc.” (all separated by tabs) and the actual values for each field are listed at the end in the same respective order (i.e.: 3487242 USPS 10/13/2011 etc.” . I only need a few of the values out of all this information, but can’t figure out a clean way to do it without being so convoluted as to make the macro insanely long. Any help would be greatly appreciated! Thank you. Quote Link to comment Share on other sites More sharing options...
Cory Posted October 27, 2011 Report Share Posted October 27, 2011 I do this thing all the time and there are different tactics depending on the exact circumstances. Perhaps you could post a sample? In this case it sounds like using the ASCII File Process feature would be best. You can treat the text as a tab delimited file. Another approach I often use is to simply use the Split command as often the desired text will always appear as the same element. In extreme cases regex via the External Script command works wonders but the concept is fairly advanced for most. Shameless plug: I do this for a living so if you need some help I’m available. Initial phone consultation is free. I believe that spending a few bucks with me can often result in saving you a lot of time experimenting and figuring things out for yourself. Quote Link to comment Share on other sites More sharing options...
greycoin Posted October 27, 2011 Author Report Share Posted October 27, 2011 // temporary sample removed Quote Link to comment Share on other sites More sharing options...
greycoin Posted October 27, 2011 Author Report Share Posted October 27, 2011 I need to gather values beginning at 3756466, but I need more than the numerical values, I also need for example a value with 'Einaudi, Ludovico, 1955-" Quote Link to comment Share on other sites More sharing options...
greycoin Posted October 27, 2011 Author Report Share Posted October 27, 2011 If the problem becomes unsolvable I would certainly give you a call. Quote Link to comment Share on other sites More sharing options...
Cory Posted October 28, 2011 Report Share Posted October 28, 2011 I'm sorry but none of your follow up posts make any sense to me. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.