read image from excel file....
-
Hi all.... i have an excel sheet with images, now i want to read the images from excel sheet and save in to a folder using c#... please help me....it is urgent.... thanks Pradeep K.
Pradeep Reddy
-
Hi all.... i have an excel sheet with images, now i want to read the images from excel sheet and save in to a folder using c#... please help me....it is urgent.... thanks Pradeep K.
Pradeep Reddy
pradeep kumarappagari wrote:
please help me....it is urgent....
That is considered impolite on this site.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
-
Hi all.... i have an excel sheet with images, now i want to read the images from excel sheet and save in to a folder using c#... please help me....it is urgent.... thanks Pradeep K.
Pradeep Reddy
Hi Try the Below code you have to add one DLL or COM Obeject I dont remember exactly Named Microsoft Excel 11.0 Object //INCLUDE using Excel; //For Excel LOCATION DLL Microsoft Excel 11.0 Object Library using System.Reflection; //For Missing using System.Runtime.InteropServices; //For Marshall //CODE::::: Excel.Application oXL; _Workbook oWB; _Worksheet oSheet; object oMissing = Missing.Value; Range oRng; oXL = new Excel.Application(); oWB = oXL.Workbooks.Open("EXCEL LOCATION", oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing); int TotalSheetsinExcel = 0; TotalSheetsinExcel = oWB.Sheets.Count - 1; oSheet = (_Worksheet)oWB.Sheets[1]; Picture pic = (Picture)oSheet.Pictures(1); //pic object will have PICTURE //Close Objects oWB.Save(); oWB.Close(null, null, null); oXL.Workbooks.Close(); oXL.Quit(); Marshal.ReleaseComObject(oXL); Marshal.ReleaseComObject(oSheet); Marshal.ReleaseComObject(oWB); GC.Collect();
-
Hi Try the Below code you have to add one DLL or COM Obeject I dont remember exactly Named Microsoft Excel 11.0 Object //INCLUDE using Excel; //For Excel LOCATION DLL Microsoft Excel 11.0 Object Library using System.Reflection; //For Missing using System.Runtime.InteropServices; //For Marshall //CODE::::: Excel.Application oXL; _Workbook oWB; _Worksheet oSheet; object oMissing = Missing.Value; Range oRng; oXL = new Excel.Application(); oWB = oXL.Workbooks.Open("EXCEL LOCATION", oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing); int TotalSheetsinExcel = 0; TotalSheetsinExcel = oWB.Sheets.Count - 1; oSheet = (_Worksheet)oWB.Sheets[1]; Picture pic = (Picture)oSheet.Pictures(1); //pic object will have PICTURE //Close Objects oWB.Save(); oWB.Close(null, null, null); oXL.Workbooks.Close(); oXL.Quit(); Marshal.ReleaseComObject(oXL); Marshal.ReleaseComObject(oSheet); Marshal.ReleaseComObject(oWB); GC.Collect();
hi thank for the reply... how to save the picture at particular location which is in pic object....
Pradeep Reddy
-
hi thank for the reply... how to save the picture at particular location which is in pic object....
Pradeep Reddy
Hi I exactly don't know the procedure. The previous one which i sent also was wrong I think as pic.Copy() is returning "true".
-
Hi I exactly don't know the procedure. The previous one which i sent also was wrong I think as pic.Copy() is returning "true".
thank u.... :-O
Pradeep Reddy