variables for import fiellds
Boaz Bezborodko
boaz at mirrotek.com
Thu Sep 20 06:06:22 PDT 2012
On 9/20/2012 8:00 AM, filepro-list-request at lists.celestial.com wrote:
>
> ------------------------------
>
> Message: 2
> Date: Thu, 20 Sep 2012 20:46:25 +1000
> From: Ken Cole <ken.m.cole at gmail.com>
> Subject: Re: variables for import fiellds
> To: Ryan Powers <ryanx at indy.rr.com>
> Cc: "filepro-list at lists.celestial.com"
> <filepro-list at lists.celestial.com>
> Message-ID:
> <CAEy9hLgrfriavfr4fQo2L=5Qs20jrpsp0S=nZxRWz-856HzGbw at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Ryan,
>
> Imports and exports don't accept variables.
>
> Ken
>
> On Thursday, 20 September 2012, Ryan Powers wrote:
>
>> I'm trying to do an import of a csv file which may vary in the number of
>> fields it contains and their order.
>>
>> My approach is to use a metadata file which can also be imported. In this
>> file, each line contains a field number that corresponds to the fields in
>> the csv. Here is what I am doing:
>>
>> 1. open the csv
>> 2. grab a free record
>> 3. open the metadata file
>> 4a. loop on the metadata import, and keep a count of the number of loops
>> 4b. read a metadata "record" which is a field number
>> 4c. put the value from csv field n into lookup ct.
>> Something like this:
>>
>> ct(4,.0)="1"
>> fd = metadata(1)
>> lkup(fd) = myimport(ct); ct=ct+"1";
>>
>> The problem is that myimport(ct) fails the syntax check. Is there a
>> function
>> that I could use?
>>
>> Thanks.
>>
>>
>>
>> ---
>> Ryan Powers
>> Bulldog Software, Inc.
>> http://www.bulldogsoftware.com
>>
>>
>>
>>
>> _______________________________________________
>> Filepro-list mailing list
>> Filepro-list at lists.celestial.com <javascript:;>
>> Subscribe/Unsubscribe/Subscription Changes
>> http://mailman.celestial.com/mailman/listinfo/filepro-list
>>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://mailman.celestial.com/pipermail/filepro-list/attachments/20120920/7bc1059d/attachment.html
>
>
>
First load all the csv data into an array and then work on the array.
You can use a simple loop to do this.
More information about the Filepro-list
mailing list