Excel导入到SqlServer需要Excel文件在SqlServer服务器上<br><br>转一代理如下:<br>procedure TForm1.btn_EXCEL2MSSQLClick(Sender: TObject);<br>begin<br>ADOConnection1.ConnectionString:='Provider=SQLOLEDB.1;Password=KCSOFT58;Persist Security Info=True;User ID=SA;Initial Catalog=KCSOFT_HIS;Data Source=CHEN';<br> ADOConnection1.Execute('SELECT * into [abc] FROM OpenDataSource( '<br> +QuotedStr('Microsoft.Jet.OLEDB.4.0')+','<br> +QuotedStr('Data Source="G:/mysmallexe/excel2sql/yp.xls";Extended Properties=excel 8.0')+')...[Abc]');<br>end; <br><br><br>-------------------------------------------------------------------------<br>如果我的說法對你有幫助,請您也幫我一個忙:<br>詳情請見:<br>http://www.delphibbs.com/delphibbs/dispq.asp?lid=3373990