当使用c#读取Excel时,遇到了读取不到表格第一行的问题,经研究后发现原来是在连接字符串中: string StrConExcel = “Provider=Microsoft.ACE.OLEDB.12.0;Data Source=” + filePath + “;Extended Properties=\”Excel 12.0;HDR=YES\”” HDR=YES的时候,第一行会被读成…
2022-03-11 227
public static DataTable ImportExcelToDataTable2(string path){ string conStr = string.Format("Provider=Microsoft.ACE.OLEDB.12.0; Data source={0}; Extended Properties=Excel 12.0;", path); using (OleDbConnection conn=new OleDbConnection(c…
2022-03-11 197
读取excel数据 到 datagrid 出现错误提示:找不到可安装的ISAM 实在没有办法了 就仔细的查看了 一下数据链接字符串: string strConn = "Provider=Microsoft.Jet.Oledb.4.0;Data Source=" + Dir + "\\"+fileName + ";Extended Properties=Ex…
2022-03-11 235
Jquery的扩展方法extend是我们在写插件的过程中常用的方法,该方法有一些重载原型,在此,我们一起去了解了解。一、Jquery的扩展方法原型是: extend(dest,src1,src2,src3...); 它的含义是将src1,src2,src3...合并到dest中,返回值为合并后的dest,由此可以看出该…
2022-02-11 215
substr函数格式 (俗称:字符截取函数) 格式1: substr(string string, int a, int b); 格式2:substr(string string, int a) ;格式1: 1、string 需要截取的字符串 2、a 截取字符串的开始位置(注:当a等于0或1时,都是从第一位开始截取) 3、b 要截取的…
2022-02-11 202