zoukankan      html  css  js  c++  java
  • excel操作 荣

     string path = @"F:\Documents and Settings\Administrator\My Documents\sql.xls";
                OleDbConnection conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Extended Properties=Excel 8.0;data source=" + path);
                OleDbDataAdapter dapter = new OleDbDataAdapter("SELECT * FROM [SQL$]", conn);
                DataTable dt = new DataTable();
                dapter.Fill(dt);
                int rows = dt.Rows.Count;
                PositionBN bn = new PositionBN();
                for (int i = 0; i < rows; i++)
                {
                    bn.Execute(dt.Rows[i][0].ToString());
                }
  • 相关阅读:
    Python Day7(相关补充)
    Python Day7
    Python Day6
    Python Day5
    Python Day4
    Python Day3
    Python Day2
    Python Day1
    复杂装饰器原理分析
    Unity 坐标
  • 原文地址:https://www.cnblogs.com/admin11/p/944564.html
Copyright © 2011-2022 走看看