Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Transfer Excel file to DBF file automatically within VFP
Message
De
31/03/2003 04:20:24
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
14/03/2003 02:32:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00765739
Message ID:
00771930
Vues:
15
>Hi all,
>
>Anyone knows how to transfer exel file to dbf file within VFP automatically, the exel file has more than one worksheet. I did some testing using macro exel but couldn't find the right syntax in VFP
>
>
>
>TIA,
>
>Budianto
#Define xlDBF3 8
lcXLSFile = FullPathToYourXLSFile
lcOutPath = FolderWhereOutputFilesWouldBeSaved
ox = Createobject('Excel.Application')
With ox
  .Workbooks.Open(lcXLSFile)
  For Each loSheet In .ActiveWorkbook.Sheets
    loSheet.SaveAs(Addbs(Fullpath(lcOutPath))+loSheet.Name, xlDBF3)
  Endfor
  .ActiveWorkbook.Saved = .T.
  .Quit
Endwith
PS: Not all sheets aer saved as DBF with this. A 'list' should be found on sheet.
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