Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Export a dbf to a xls or xl5
Message
 
 
À
08/03/2005 17:43:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
00993820
Message ID:
00993841
Vues:
22
You can copy out to CSV and than use Excel automation to conver to XLS. Sample code
SELECT mytable
lcCsvFile = "H:\temp\something.csv"
lcExcelName = FORCEEXT(lcCsvFile, "XLS")
COPY TO (lcCsvFile) TYPE CSV
oExcel = CreateObject("Excel.Application")
*oExcel.Visible = .T.
oWorkbook = oExcel.Workbooks.Open(lcCsvFile)
IF FILE(lcExcelName)
	ERASE (lcExcelName)
ENDIF	
xlExcel5 =	39
oWorkbook.SaveAs(lcExcelName,xlExcel5)
oExcel.Quit()

* Launch Excel with file created
RUN "&lcExcelName"
>thnx sylvain for your reply but aie aie i'm now in big troubles now....
>cvs is no alternative because the user wants them in a excel file... and i can't update to vfp9 ....
>
>Maybe there is another solution to my problem. Can't be i'm the only one with this issue or am i so unique lol
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform