Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Exporting data with memo fields to Access or Excel
Message
 
À
01/12/2003 17:06:54
Larry Huisingh
Lockheed Martin Information Technology
Richland, Washington, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00854839
Message ID:
00855135
Vues:
34
Try this for Excel:
ObjExcel= CREATEOBJECT("Excel.Application")
ObjExcel.DisplayAlerts = .f.
ObjExcel.Workbooks.Add()
ObjExcel.visible=.t.

ConnectionString="ODBC;DSN=Visual FoxPro Tables;UID=;PWD=;SourceDB=c:\;SourceType=DBF;Exclusive=No;BackgroundFetch=Yes;Collate=Machine;"
sqlquery="SELECT * FROM yourtable_fullpath.dbf"

ObjExcel.ActiveSheet.QueryTables.Add(;
		ConnectionString,;
		ObjExcel.ActiveSheet.Range("A1"),;
		sqlquery).Refresh


ObjExcel.quit
ObjExcel=.null.
Try this for Access (does not like long file names !!):
oAccess = CreateObject("Access.Application")
oAccess.NewCurrentdatabase("c:\hi.mdb")
oAccess.DoCmd.TransferDatabase(0, "FoxPro 3.0", "c:\", 0, "test.dbf", "out", 0)
oAccess.quit
oAccess=.null.
>I have been asked to convert a FoxPro (2.5) table to Access or Excel. The problem is that the FoxPro table has several memo fields and those don't get copied when using EXPORT TO XLS or COPY TO XLS. Is there a method, aside from creating a text file, for getting data including memo fields into another format?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform