Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Append Excel file to dbf
Message
De
16/03/2005 10:20:04
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 6
OS:
Windows 2000
Network:
Windows 2000 Pro
Database:
Visual FoxPro
Divers
Thread ID:
00996256
Message ID:
00996332
Vues:
9
>oExcel = CreateObject("Excel.Application")
>oExcel.WorkBooks.Add
>With oExcel
> .DisplayAlerts = .F.
> .Range("A1").Select
> .ActiveCell.FormulaR1C1 = "JOSEFA"
> .Range("B1").Select
> .ActiveCell.FormulaR1C1 = "8754"
> .Range("C1").Select
> .ActiveCell.FormulaR1C1 = "A"
> .Range("A2").Select
> .ActiveCell.FormulaR1C1 = "MARIA"
> .Range("B2").Select
> .ActiveCell.FormulaR1C1 = "6955"
> .Range("C2").Select
> .ActiveCell.FormulaR1C1 = "A"
> .Range("A3").Select
> .ActiveCell.FormulaR1C1 = "PETRONA"
> .Range("B3").Select
> .ActiveCell.FormulaR1C1 = "4522"
> .Range("C3").Select
> .ActiveCell.FormulaR1C1 = "A"
> .Range("A4").Select
> .ActiveCell.FormulaR1C1 = "LUISA"
> .Range("B4").Select
> .ActiveCell.FormulaR1C1 = "96956"
> .Range("C4").Select
> .ActiveCell.FormulaR1C1 = "B"
> .Range("A5").Select
> .ActiveCell.FormulaR1C1 = "GABRIELA"
> .Range("B5").Select
> .ActiveCell.FormulaR1C1 = "741"
> .Range("C5").Select
> .ActiveCell.FormulaR1C1 = "B"
> .Range("A6").Select
> .ActiveCell.FormulaR1C1 = "MARGARITA"
> .Range("B6").Select
> .ActiveCell.FormulaR1C1 = "6556"
> .Range("C6").Select
> .ActiveCell.FormulaR1C1 = "A"
> .Range("A7").Select
> .ActiveCell.FormulaR1C1 = "MARTHA"
> .Range("B7").Select
> .ActiveCell.FormulaR1C1 = "112"
> .Range("C7").Select
> .ActiveCell.FormulaR1C1 = "B"
> .Range("A8").Select
> .ActiveCell.FormulaR1C1 = "TANIA"
> .Range("B8").Select
> .ActiveCell.FormulaR1C1 = "664"
> .Range("C8").Select
> .ActiveCell.FormulaR1C1 = "C"
> .Range("A9").Select
> .ActiveCell.FormulaR1C1 = "TERESA"
> .Range("B9").Select
> .ActiveCell.FormulaR1C1 = "6998"
> .Range("C9").Select
> .ActiveCell.FormulaR1C1 = "D"
>
> .ActiveWorkbook.SaveAs("C:\MiTabla.Dbf", 11)
>EndWith
>
>oExcel.Quit
>Release oExcel
>
>Use c:\Mitabla

David,
This is good if you've few fields and/or records. Otherwise would be very slow.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform