windows窗体上放了一个Textbox1,2个按钮button1和button2~按button1选择excel文件~按button2进行相关处理

Code Snippet

private  void button1_click(object sendeer,EventArgs e)

{

OpenFileDialog  openFiledialog1=new OpenFileDialog();

openFileDialg1.filter="Excel文件|*.xls";

openFileDialg1.ShowDialog();

textBox1.Text=openFileDialog1.FileName;

}

private void button2_click(object sender, EventArg e)

{

DataSet dt=ReadExcel(textBox1.Text);

//然后进行您需要的数据处理

}

C#窗体读取EXCEL存入SQL数据库的更多相关文章

  1. .NET导入Excel到SQL数据库

    在我们开发各类应用型系统,经常会遇到导入导出Excel,为什么会用到他呢?企业或者单位在从无信息化到信息化的一个转变过程.在没有信息化的企业或单位之前,一般都采用Excel来记录相应的数据,做统计计算 ...

  2. net9:图片文件转换成二进制流存入SQL数据库,以及从数据库中读取二进制流输出文件

    原文发布时间为:2008-08-10 -- 来源于本人的百度文章 [由搬家工具导入] using System;using System.Data;using System.Configuration ...

  3. C#读取Excel,Access数据库

    出自:http://blog.csdn.net/limpire/article/details/2599760 使用 OpenRowSet 和 OpenDataSource 访问 Excel 97-2 ...

  4. ASP.NET导入Excel到SQL数据库

    protected void btnChange_Click(object sender, EventArgs e) { UserInfoClass tClass = (UserInfoClass)S ...

  5. scrapy自动抓取蛋壳公寓最新房源信息并存入sql数据库

    利用scrapy抓取蛋壳公寓上的房源信息,以北京市为例,目标url:https://www.dankegongyu.com/room/bj 思路分析 每次更新最新消息,都是在第一页上显示,因此考虑隔一 ...

  6. PHP读取Excel数据写入数据库(包含图片和文字)

    public function test(){ $exts = 'xlsx'; //导入PHPExcel类库,因为PHPExcel没有用命名空间,只能inport导入 import("Org ...

  7. 读取excel数据生成sql脚本

    package com.interact.util; import jxl.Cell; import jxl.Sheet; import jxl.Workbook; import jxl.read.b ...

  8. 【c#操作office】--OleDbDataAdapter 与OleDbDataReader方式读取excel,并转换为datatable

    OleDbDataAdapter方式: /// <summary> /// 读取excel的表格放到DataTable中 ---OleDbDataAdapter /// </summ ...

  9. php读取excel日期类型数据的例子

    提供一个读取的函数:  代码如下 复制代码 //excel日期转换函数function excelTime($date, $time = false) { if(function_exists('Gr ...

随机推荐

  1. Codeforces Round #397 by Kaspersky Lab and Barcelona Bootcamp (Div. 1 + Div. 2 combined) A. Neverending competitions 水题

    A. Neverending competitions 题目连接: http://codeforces.com/contest/765/problem/A Description There are ...

  2. 允许mysql远程用户连接。

    默认mysql是禁止远程用户连接的.连接提示: 1045,“Access denied for user 'root'@'192.168.100.1' (using password:YES)&quo ...

  3. poll() can't detect event when socket is closed locally?

    from https://stackoverflow.com/questions/5039608/poll-cant-detect-event-when-socket-is-closed-locall ...

  4. AES加解密算法在Android中的应用及Android4.2以上版本调用问题

     from://http://blog.csdn.net/xinzheng_wang/article/details/9159969 AES加解密算法在Android中的应用及Android4.2以上 ...

  5. Ioc:Autofac Registration Concepts

    Reflection Components When using reflection-based components, Autofac automatically uses the constru ...

  6. tomcat配置jdbc

    server.xml下<GlobalNamingResources> <Resource name="jdbc/Huobanplus"               ...

  7. jscript调用bat注意事项

    开发的游戏项目,需要一个工具,对指定的资源进行复制.加密,然后打包.之前打包时都手工操作,复制与加密这二步分别写了几个工具(lua加密与图片资源加密是分开的),后来感觉bat操作路径特别麻烦,所以我改 ...

  8. 获取AppStore上架后的应用版本号

    应用通过审核以后,由开发者设置应用上架,但何时能在appstore搜索到该应用,这个时间不等,有时候15分钟左右有时候2个多小时,以前就是隔一段时间打开网页然后刷新一下,或者搜索一下,查看版本号,操作 ...

  9. mongodb centos7上的安装

    1,下载安装包 下载mongoDB的安装文件地址:https://www.mongodb.org/downloads#production 选择Linux 64-bit legacy 版本,下载到目标 ...

  10. CircleImageManager——圆形 / 圆角图片的工具类

    这个类可以实现圆角,或者是圆形图片的操作. CircleImageManager.java package com.kale.utils; import android.content.Context ...