Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copy to / export type xls
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01128551
Message ID:
01128569
Vues:
19
>Excluding dbf field names in the XLS worksheet?
* Coipy to XLS and delete the first row
lcXlsFile = FULLPATH("Test.xls")
COPY TO (lcXlsFile) XL5
oExcel = CreateObject("Excel.Application")
*oExcel.Visible = .T.
oWorkbook = oExcel.Workbooks.Open(lcXlsFile)
oWorkbook.ActiveSheet.Rows(1).Delete()
oWorkbook.Save()
oExcel.Quit

* or
* Coopy to CSV, open and save as XLS
#DEFINE xlWorkbookNormal	-4143	
lcXlsFile = FULLPATH("Test.xls")
lcCsvFile = FORCEEXT(lcXlsFile, "CSV")
COPY TO (lcCsvFile) DELIMITED WITH "" with CHARACTER ,
oExcel = CreateObject("Excel.Application")
*oExcel.Visible = .T.
oWorkbook = oExcel.Workbooks.Open(lcCsvFile)
oWorkbook.SaveAs(lcXlsFile, xlWorkbookNormal)
oExcel.Quit
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform