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.
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