C#.NET 连接数据库
string sql = "select * from [sheet1$]";
OleDbConnection objConnection = new OleDbConnection(strConnection);
? "c:\book1.xls "文件的路径
? "provider=microsoft.jet.oledb.4.0"是指数据提供者,这里使用的是Microsoft Jet引擎,也就是excel中的数据引擎,asp.net就是靠这个和excel的数据库连接的.
? "data source"是指明数据源的位置
? "[sheet1$]" sheet1为excel里标的名称,用法:[name$]
<script type="text/javascript"></script>