
Hello every one.I?m trying to read images from an excel sheet using OleDbDataReader. My excel file has 6 columns of data, the first 5 are all text but the last is image. While I?m reading the record, It?s doing fine on the first 5 columns but return me with a ?blank? for the sixth column.
Here is my demonistration code:
OleDbConnection conn = null;
try { conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;DataSource="
+ excelFileName + ";Extended Properties='Excel 8.0;HDR =YES;'");
conn.Open(); OleDbCommand cmd = new OleDbCommand("Select * From[Sheet1$]", conn);
OleDbDataReader dr = cmd.ExecuteReader(); while (dr.Read()) { dr.GetValue(5); //------ Picture field comming blank } dr.Close(); } finally { if (conn != null) conn.Close(); }Any one please help me. if get any solution plz mail me(thesanjiv@gmail.com) Thanks, Sanjeev
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.