a1jit Posted August 29, 2005 Posted August 29, 2005 Guys, i just developed a simple code, opening up excel file.. And i keep getting error message saying that namespace for activexOject could not be found.. I have already included Microsoft ActiveXObject reference here..still getting the error.. Aany idea how to deal with this> // Declare the variables Excel.Application oXL; Excel._Workbook oWB; Excel._Worksheet oSheet; // Create the Excel application object. oXL = new ActiveXObject("Excel.Application"); oXL.Visible = true; ((Excel.Worksheet)oWB.Sheets[2]).Select( Type.Missing); oSheet = (Excel._Worksheet)oWB.ActiveSheet; Quote
a1jit Posted August 31, 2005 Author Posted August 31, 2005 Guys, i just developed a simple code, opening up excel file.. And i keep getting error message saying that namespace for activexOject could not be found.. I have already included Microsoft ActiveXObject and microsoft scripting runtime reference here..still getting the error.. Aany idea how to deal with this> // Declare the variables Excel.Application oXL; Excel._Workbook oWB; Excel._Worksheet oSheet; // Create the Excel application object. oXL = new ActiveXObject("Excel.Application"); oXL.Visible = true; ((Excel.Worksheet)oWB.Sheets[2]).Select( Type.Missing); oSheet = (Excel._Worksheet)oWB.ActiveSheet; Quote
Administrators PlausiblyDamp Posted August 31, 2005 Administrators Posted August 31, 2005 If you are doing this through .Net you will not require a reference to the scripting runtime, just create a reference to the relevant office / excel component and then you should be able to create an instance with code similar to Excel.Application oXL; Excel._Workbook oWB; Excel._Worksheet oSheet; // Create the Excel application object. oXL = new Excel.Application; Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.