Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Exporting data with memo fields to Access or Excel
Message
 
To
01/12/2003 17:06:54
Larry Huisingh
Lockheed Martin Information Technology
Richland, Washington, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00854839
Message ID:
00855135
Views:
35
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?
Previous
Reply
Map
View

Click here to load this message in the networking platform