c#代码,用于在数据库中插入total excel coloumn [英] c# code for how to insert total excel coloumn in database

查看:69
本文介绍了c#代码,用于在数据库中插入total excel coloumn的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

c#代码,用于如何在数据库中插入总excel coloumn

c# code for how to insert total excel coloumn in database

推荐答案

试试这可能会对你有所帮助

Try this it may help you
string connectionString = GetConnectionString();
                        OleDbConnection connection = new OleDbConnection(connectionString);
                        connection.Open();
                        OleDbDataAdapter adapter = new OleDbDataAdapter("SELECT * FROM [Sheet2


,连接);
DataTable dtImprtExcel = new DataTable();
adapter.Fill(ds);
connection.Close();
", connection); DataTable dtImprtExcel = new DataTable(); adapter.Fill(ds); connection.Close();





之后使用表ds填充数据表



after that use the table ds to fill your datatable


这篇关于c#代码,用于在数据库中插入total excel coloumn的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆