string strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" +"Data Source="+ Path+";"+"Extended Properties=Excel 8.0;";
OleDbConnection conn = new OleDbConnection(strConn);
conn.Open();
string strExcel = "";
OleDbDataAdapter myCommand = null;
DataSet ds = null;
strExcel="select * from " + "[" + sheetName + "$]";
myCommand = new OleDbDataAdapter(strExcel, strConn);这样读取SHEET为过大,如何在
strExcel="select * from " + "[" + sheetName + "$]";
中指定读取的行数呢,如读取前5000
OleDbConnection conn = new OleDbConnection(strConn);
conn.Open();
string strExcel = "";
OleDbDataAdapter myCommand = null;
DataSet ds = null;
strExcel="select * from " + "[" + sheetName + "$]";
myCommand = new OleDbDataAdapter(strExcel, strConn);这样读取SHEET为过大,如何在
strExcel="select * from " + "[" + sheetName + "$]";
中指定读取的行数呢,如读取前5000
select * from [sheetName$100:100]
看到有人用这样的语法,可是我一用就读不到值