本文介绍了Exel SQL导入问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题;

我想将Excel数据导入sql中,
以下代码示例是我之前尝试过的示例
SqlConnection baglanti =新的SqlConnection(@")

SqlCommand komut = new SqlCommand(插入到ExelImport select * from openrowset(" Microsoft.Jet.OLEDB.4.0," Excel8.0; Database = C:\\ deneme," SELECT * FROM [Sheet1 $]''),baglanti);
baglanti.Open();
komut.ExecuteNonQuery();

我可以帮你吗

My Problem;

I want to import excel data into sql,
The following code sample is an example I''ve tried before
SqlConnection baglanti=new SqlConnection(@"")

SqlCommand komut = new SqlCommand("insert into ExelImport select * from openrowset (''Microsoft.Jet.OLEDB.4.0'',''Excel8.0;Database=C:\\deneme'',''SELECT * FROM [Sheet1$]'')",baglanti);
baglanti.Open();
komut.ExecuteNonQuery();

Can I Help You

推荐答案



这篇关于Exel SQL导入问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-19 04:44