Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Importing from Excel truncates memos
Message
 
À
06/01/2004 12:45:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00864238
Message ID:
00864276
Vues:
15
AFAIK, the only work around is as in the example below:
LcFlSrcXls="c:\book1.xls"
import from (LcFlSrcXls) xls

*assuming field(1) should contain MEMO from Excel
alter table book1 alter column (field(1)) M

oleapp = CREATEOBJECT("Excel.Application")
OleApp.DisplayAlerts = .f.
=oleapp.Workbooks.Open(LcFlSrcXls)

sele book1
iscan=0
scan
	iscan=iscan+1
	replace (field(1)) with oleapp.ActiveSheet.Range("A"+alltr(str(iscan))).Text
endscan

oleapp.Workbooks.Close
OleApp.Quit
oleapp=.null.
RELEASE oleapp
>Hello,
>
>I'm having trouble importing data from an Excel spreadsheet. In the resulting dbf, memo data is truncated at 254 chars which leads me to believe that the import does things in 2 steps:
>- Imports into a Char field (254 max)
>- Converts that field into a memo (too late, the beyond-254 chars are already lost)
>
>Am I missing something ?
>
>Any workaround ?
>
>Thanks,
>
>Henry
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform