Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
COPY TO an Excel - including Memo fields
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00844067
Message ID:
01127473
Views:
40
How would you import long field into DBF?

E.g.
 lcRange = "A1:"
			lcRange = m.lcRange + chr(64 + m.lnCols) + alltrim(str(m.lnRows))
			loSheet.range(m.lcRange).select

			lcStr = strtran(m.lcStr,space(1),"_")
			lcStr = strtran(m.lcStr,".","_")
			lcStr = upper(strtran(upper(justfname(m.tcInputFile)),".XLS","") + ;
				"(" + m.lcStr + ")")

			OleApp.DisplayAlerts = .f.

*#DEFINE xlDBF3	8

			OleApp.ActiveWorkbook.saveas(sys(5)-curdir()- m.lcStr, xlDBF3)
truncates the data. Is where a better way to import Excel of unknown structure?

>I am using this:
>
>.....
>ConnectionString="ODBC;DSN=Visual FoxPro Tables;UID=;PWD=;SourceDB=c:\;SourceType=DBF;Exclusive=No;BackgroundFetch=Yes;Collate=Machine;"
>
>sqlquery="SELECT * FROM c:\foxwork\vfpapps\syserr.dbf"
>
>ObjExcel.ActiveSheet.QueryTables.Add(;
> ConnectionString,;
> ObjExcel.ActiveSheet.Range("A1"),;
> sqlquery).Refresh
>....
>
>>I saw the answer to this awhile ago and thought I saved it for future reference....now the future is here and I can't find it!
>>
>>I am using the COPY TO command to export records to an Excel spreadsheet but I also need to export the text in the memo field for each record. I know there was a limit of 254 chars on the workaround, and that is fine.
>>
>>Can someone refresh my memory?
>>
>>tks,
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform