Adding Column Names & Metadata to Exports
Mike Schwartz
mschw at athenet.net
Mon Oct 3 18:48:37 PDT 2016
> I'm not sure if this helps, but it is not going to a spreadsheet, however
the
> idea is the same. I'm using the fp's export routine like this and do not
see
> how to integrate a different stream for the metadata into the export
stream
> routine.
>
> │ If:
> │
> Then: dim array(20):1 ; ct="1" ; f=""
> │
> 5 ------- - - - - - - - - - - - - - - -
-
> loop │ If: ct le "20"
> │
> Then: f=f&array(ct)&"^" ; ct=ct+"1" ; goto loop │
> 6 ------- - - - - - - - - - - - - - - -
-
> │ If:
> │
> Then: rr = "Birthday-"{ pp {""
> │
> 7 ------- - - - - - - - - - - - - - - -
-
> │ If:
> │
> Then: export ascii data=(rr) r=\n │
> 8 ------- - - - - - - - - - - - - - - -
-
> │ If:
> │
> Then: data(1)=f{"^"{pp
> │
> 9 ------- - - - - - - - - - - - - - - -
-
> │ If:
> │
> Then: write data
>
> Also related... Is there a way to do processing on records AS they are
being
> exported? It appears that we have little control with export.
>
> Thanks,
> Stanley
This looks approximately correct if you are trying to export the first
20 fields of a file to a row in an ascii file. Is this part functioning
correctly?
And you can do any sort of processing that you want when you are doing
an export. What sort of processing do you need to do in this table that
isn't working?
You can write the metadata (column headers) by putting the headers into
a separate subroutine and calling that subroutine just once. (Actually,
call the header writing routine once for EACH ["Birthday-"{ pp] file that
you create.)
I will see if I can find a simple export process that writes a header
for you and post it yet this evening...
Mike
More information about the Filepro-list
mailing list