Hi all, Im using the following codes to retrieve records from excel file.
OleDbConnection conn = new OleDbConnection (@"Provider=Mic rosoft.Jet.OLED B.4.0; Data Source=" + Path + "; Extended Properties='Exc el 8.0;HDR=Yes;IME X=1'");
OleDbCommand cmd = new OleDbCommand("S ELECT TOP 10 * FROM [Sheet1$] WHERE [Project] <> ''", conn);
DataSet ds = new DataSet();
da = new OleDbDataAdapte r(cmd);
da.Fill(ds);
DataTable table = ds.Tables[0];
In the excel file, there's a column storing values such as "IRAS 2009", "Nov-07" etc. When i retrieve from the DataTable it return me NULL and "31-Nov-07" respectively.
Why is it so? Why im unable to get the exact value and those in the excel file? Any help is greatly appreciated.
OleDbConnection conn = new OleDbConnection (@"Provider=Mic rosoft.Jet.OLED B.4.0; Data Source=" + Path + "; Extended Properties='Exc el 8.0;HDR=Yes;IME X=1'");
OleDbCommand cmd = new OleDbCommand("S ELECT TOP 10 * FROM [Sheet1$] WHERE [Project] <> ''", conn);
DataSet ds = new DataSet();
da = new OleDbDataAdapte r(cmd);
da.Fill(ds);
DataTable table = ds.Tables[0];
In the excel file, there's a column storing values such as "IRAS 2009", "Nov-07" etc. When i retrieve from the DataTable it return me NULL and "31-Nov-07" respectively.
Why is it so? Why im unable to get the exact value and those in the excel file? Any help is greatly appreciated.
Comment