Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Append from (cFileName) xl8 -- Truncation
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00743344
Message ID:
00745579
Vues:
40
Correct. Here is a chunck of code that may help others
lcExcelFile = GETFILE()

TEXT TO lcConnStr TEXTMERGE NOSHOW
DRIVER=Microsoft Excel Driver (*.xls);
FIL=excel 8.0;
DefaultDir=<<JUSTPATH(lcExcelFile)>>;
DBQ=<<lcExcelFile>>;
ENDTEXT

lnConnHand = SQLSTRINGCONNECT(lcConnStr)
IF lnConnHand > 0
	STORE SQLTABLES(lnConnHand, 'TABLE', 'tExcelFile') TO nTables
	IF nTables > 0
	   SELECT tExcelFile
	   lcSheet=ALLTRIM(tExcelFile.Table_Name)
		lnSqlRes = SQLEXEC(lnConnHand, [SELECT * FROM "]+lcSheet+["],'tImport')
	ENDIF
	ln=SQLDISCONNECT(lnConnHand)
	USE IN tExcelFile
	USE IN tImport
ENDIF
Regards
Geoff Scott


>You're welcome.
>SQLTABLES could also help in that case.
>
>>It would appear that I need to have a $ after the sheet name.
>>
>>Looking at the correct spreadsheet also helps.
>>
>>:)))
>>
>>Most of the fields come in as memo fields which should resolve the problem.
>>
>>Thanks once again Sergey
May all your weeds be wildflowers
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform