Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to convert .txt report to dbf??
Message
From
04/04/2007 17:49:27
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01212239
Message ID:
01212242
Views:
9
You could read the text with FileToStr() followed by alines(), discard the first x lines, and then process from there.

You might also create the table structure, do an APPEND FROM, and discard the first x records.

>Hi guys!
>
>At the company I'm working to, exist a program wich only gives some reports in a text File. We have no access to the tables, so I need to convert these files into a dbf, then can compare it with another tables... this is an example of my reports structure:
>
>
>DISTRIBUCION                                                                                                      4/04/2007 12:48:19
>
>Sucursal:     1
>Sucursal(es): 11
>
>Margenes de Utilidad por Articulo (Periodo del 5/03/2007 al 4/04/2007)                                                    Pagina:001
>------------------------------------------------------------------------------------------------------------------------------------
>#Articulo    Descripcion del Articulo           CantidadUnitaria UniMe   Costo de Ventas    Importe Ventas   Margen Utilidad  %Contr
>------------------------------------------------------------------------------------------------------------------------------------
>10018        CALENTADOR AUT/GUARDIAN 40 LTS              71      PZA          $45,089.63        $52,505.64         $7,416.01   1.932
>10020        CALENTADOR SEMIAUT.40 LTS GUARDIAN         274      PZA         $150,598.98       $169,406.99        $18,808.01   4.899
>110041       TANQUE CARBURACION 130 LITROS PARA          10      PZA          $12,590.00        $17,094.00         $4,504.00   1.173
>160004       LAMPARA GAS L.P. DE 300 BUJIAS              36      PZA           $3,873.21         $6,069.82         $2,196.61   0.572
>160006       LAMPARA GAS L.P. DE 600 BUJIAS               7      PZA             $839.07         $1,303.04           $463.97   0.121
>160010       SOPLETE USO RUDO EN EMPAQUE BLISTE         376      PZA          $33,433.92        $49,909.43        $16,475.51   4.291
>160011       SOPLETE DE GAS DESECHABLE                  357      PZA          $22,216.11        $41,237.00        $19,020.89   4.954
>
>
>
>There are many pages in each report and there are around 30 stores to convert... Any idea??
>
>Thanks in advance...
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform