Hello All,
 
Thanks to John W. Krahn and many others for their assistance in writing a script that will read a fixed length text file. 
 
I have successfully extracted the data I need and I am attempting to write the data into rows in excel. 
 
I would like to loop through the data starting with customer number and continue until I reach another customer number, at which time I would like to start a new row. 
 
I have included the sample data (results from extraction) as a attachment.
 
 
-------------------------------------------
Will Martell
Dallas Texas
-------------------------------------------
$VAR1 = [
          {
            'cust_number' => '003678',
            'customer_type' => 'OPEN ITEM',
            'cust_name' => 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
            'phone' => '',
            'acct_contact' => '',
            'credit_limit' => '0.00',
            'cycle' => '1'
          },
          {
            'days_61_90' => '',
            'days_1_30' => '',
            'inv_date' => '121703',
            'days_over_90' => '',
            'days_31_60' => '',
            'inv_no' => '054616',
            'total_ar' => '603.73',
            'unap_cash' => '',
            'on_hold' => '',
            'current' => '603.73',
            'type' => 'I'
          },
          {
            'cust_totals_days_over_90' => '',
            'cust_totals_total_ar' => '603.73',
            'cust_totals_days_1_30' => '',
            'cust_totals_unap_cash' => '',
            'cust_totals_on_hold' => '',
            'cust_totals_days_61_90' => '',
            'cust_totals_current' => '603.73',
            'cust_totals_days_31_60' => ''
          },
          {
            'cust_number' => '003662',    <------------------ write a new excel row 
starting here
            'customer_type' => 'OPEN ITEM',
            'cust_name' => 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
            'phone' => '',
            'acct_contact' => '',
            'credit_limit' => '0.00',
            'cycle' => '1'
          },
          {
            'days_61_90' => '',
            'days_1_30' => '',
            'inv_date' => '121603',
            'days_over_90' => '',
            'days_31_60' => '',
            'inv_no' => '054601',
            'total_ar' => '4,900.00',
            'unap_cash' => '',
            'on_hold' => '',
            'current' => '4,900.00',
            'type' => 'I'
          },
          {
            'cust_totals_days_over_90' => '',
            'cust_totals_total_ar' => '4,900.00',
            'cust_totals_days_1_30' => '',
            'cust_totals_unap_cash' => '',
            'cust_totals_on_hold' => '',
            'cust_totals_days_61_90' => '',
            'cust_totals_current' => '4,900.00',
            'cust_totals_days_31_60' => ''
          }
        ];

Tool completed successfully

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>

Reply via email to