Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Modifying Excel Import Procedure?
Message
De
11/04/2002 11:24:52
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
11/04/2002 10:47:53
N. Lea
Nic Cross Enterprises
Valencia, Californie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Divers
Thread ID:
00643706
Message ID:
00643776
Vues:
17
Download #9498 contains Excel constants. You need it for the following program.

The result will be exactly the same as if you export manually from Excel. For best results, the spreadsheet should have a first row with column (field) names.
#include include\xl97cons.h
oExcel = CreateObject("Excel.Application")
oExcel.Visible = 1   && for debugging
oExcel.Workbooks.Open(fullpath("") + "sample.xls") 
erase sample.dbf
oExcel.ActiveWorkbook.SaveAs(fullpath("") + "sample.dbf", xlDBF3)
oExcel.Activeworkbook.Close(0)
See also: SET CPDIALOG.

HTH, Hilmar.

>I attempted to export directly from Excel, but it cut off a lot of the data. i looked up the automation, but I do not understand it's process. I am attemping to create the table first and append from, but it will not let me append from an xls file.
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)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform