A
ad
I use ado.net to read excel file into dataset.
But there are some cell that hold some value in Excel, but when I read it
with ado.net, and display in a dataGrid
It disappear.
How can I do that?
----------------------------------------------------------------------------
-----------------------------------------------------
string sConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data
Source=" + savePath +
"; Extended Properties=Excel 8.0;";
string sSelect = "SELECT * FROM [Sheet1$]";
OleDbConnection objConn = new OleDbConnection(sConnectionString);
objConn.Open();
OleDbCommand objCmdSelect = new OleDbCommand(sSelect, objConn);
OleDbDataAdapter objAdapter1 = new OleDbDataAdapter();
objAdapter1.SelectCommand = objCmdSelect;
objAdapter1.Fill(ds, "XLData");
But there are some cell that hold some value in Excel, but when I read it
with ado.net, and display in a dataGrid
It disappear.
How can I do that?
----------------------------------------------------------------------------
-----------------------------------------------------
string sConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data
Source=" + savePath +
"; Extended Properties=Excel 8.0;";
string sSelect = "SELECT * FROM [Sheet1$]";
OleDbConnection objConn = new OleDbConnection(sConnectionString);
objConn.Open();
OleDbCommand objCmdSelect = new OleDbCommand(sSelect, objConn);
OleDbDataAdapter objAdapter1 = new OleDbDataAdapter();
objAdapter1.SelectCommand = objCmdSelect;
objAdapter1.Fill(ds, "XLData");