第一次用Excel做数据库

看到朋友博客上面多了个用Excel做数据库的连接:"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Excel文件物理路径;Extended Properties=Excel8.0",看到之后有点冲动,于是就搬到自己的vs.net上了,数据是能展现,不过还是觉得应该再具体设置下好,于是到网上荡了些圈之后有了下面的连接;
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyExcel.xls;Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1"""
"HDR=Yes;" indicates that the first row contains columnnames, not data
"IMEX=1;" tells the driver to always read "intermixed" data columns as text
TIP! SQL syntax: "SELECT * FROM [sheet1$]" - i.e. worksheet name followed by a "$" and wrapped in "[" "]" bracket s.

转载于:https://www.cnblogs.com/yuanweiming84/archive/2005/11/15/277220.html

你可能感兴趣的:(数据库)