Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Import excel memo to foxpro
Message
De
18/02/2009 21:21:01
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01382769
Message ID:
01382813
Vues:
30
>Check Re: Copy To Type XL5 - limit on number of records? Thread #1379610 Message #1379634
>
>>For years I have been using the following code to import excel data to VFP memo. it was works fine.
>>I using Excel 2002
>>
>>
>>store SQLSTRINGCONNECT(;
>> "DRIVER={Microsoft Excel Driver (*.xls)};" + ;
>> "FIL=Excel 97;" + ;
>> "DefaultDir=c:\;" + ;
>> "DBQ=c:\name.xls");
>> TO gnConnHandle
>>
>>CURSORSETPROP("FetchMemo",.t.,0)
>>
>>?SQLExec(gnConnHandle, 'select * from "Sheet1$"')
>>
>>
>>Today I did an export it only copied 256 characters from Excel to the memo field. I am so lost I have no clue why
>>it stops copying the whole data in the excel cell.
>>
>>Help

As I thought this one was weird. I know you probably experienced doing SELECT statement and getting a truncated text back because the first row has a short data in it.
Well, this one is the same category. The memo column in excel first row is NULL so the above code gave me back 256 characer for the memo. When I changed the data in the first row I got the right data back.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform