Jump to content
Macro Express Forums

Processing A Comma Delimited Text File


HeyJim
 Share

Recommended Posts

I used this function/process a few months ago and love it. It was a tremendous help then. But, I'm still a novice and not sure this following is "doable". I've searched the help files and forum. Probably the answer was right in front of me and I didn't realize it. Can you kick start me on this?

 

What I need to do is take that comma delimited file of 25 records with 9 fields each and expand it by mixing fields from one record with fields of another record.

 

Take 1A, 1B, 1C, 1D etc. (Where 1 is the record & A is the field)

2A, 2B, 2C, 2D

3A, 3B, 3C, 3D

And then add to the csv file the following records...

1A, 1B, 1C, 2D

1A, 1B, 1C, 3D

1A, 1B, 1C, 4D etc. and along the way also create things like

1A, 1B, 2C, 1D AND

1A, 2B, 1C, 1D as well as combinations such as

4A, 4B, 4C, 1A as well as everything in between. I don't know how to do the math but I suspect this will result in thousands of combinations. Hopefully this makes sense by now. My apologies if it doesn't.

 

I know this has to involve looping but I'm not sure how to mix and match the variable combinations from record to record. Any and all help greatly appreciated.

Link to comment
Share on other sites

Hi,

If your fields etc are small, you can use environment variables [now won't run if file size over 32k]; these get/ save macros will give you the idea if you want to re-write for other methods;

[** limits; Environment variables limits]

Just import the 3 macros, and run example; write your own example to handle the variables

Best, Randall

{_GetCSVFields}.mxe

{_SaveCSVFields}.mxe

FieldCSVExample.mxe

EDIT; changed the note and Get file to warn re file size

__GetCSVFields_.mxe

Edited by randallc
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...