Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Append from (cFileName) xl8 -- Truncation
Message
From
26/01/2003 17:18:49
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00743344
Message ID:
00745579
Views:
39
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
Previous
Reply
Map
View

Click here to load this message in the networking platform