C
castlemve
I'm working on cleaning up a text file of records to import into Excel.
Using macros, I have been able to get it to look like the following:
fieldname1;value^p
fieldname2;value^p
fieldname3;value^p
^p
fieldname1;value^p
fieldname2;value^p
fieldname3;value^p
^p
.....
Actually, this is the way it's supposed to look. Unfortunately, one of the
fields shows up in a record only if there was a value for it. If there is no
value, the field itself is not there. For instance, fieldname2 exists only
in some records. There isn't a ^p or anything to show the field exists. I
need the field to be there in order to import the document into Excel.
I'm hoping someone can provide some code that would only add the field if it
doesn't exist in a record. There are about 20 records in the document. I
have about 20 of these documents to do and will likely need to do this again
in the future.
Thanks.
Using macros, I have been able to get it to look like the following:
fieldname1;value^p
fieldname2;value^p
fieldname3;value^p
^p
fieldname1;value^p
fieldname2;value^p
fieldname3;value^p
^p
.....
Actually, this is the way it's supposed to look. Unfortunately, one of the
fields shows up in a record only if there was a value for it. If there is no
value, the field itself is not there. For instance, fieldname2 exists only
in some records. There isn't a ^p or anything to show the field exists. I
need the field to be there in order to import the document into Excel.
I'm hoping someone can provide some code that would only add the field if it
doesn't exist in a record. There are about 20 records in the document. I
have about 20 of these documents to do and will likely need to do this again
in the future.
Thanks.