unable to cast COM object of type 'microsoft.Office.Interop.Excel.ApplicationClass' to 'microsoft.Office.Interop.Excel.Application'"
问题 This is my first attempt to capture some data from excel from within one C# console application. I get the error \"unable to cast COM object of type \'microsoft.Office.Interop.Excel.ApplicationClass\' to \'microsoft.Office.Interop.Excel.Application\'\". This code used the \'Microsoft Excel 12.0 Object Library\' , and I gave reference to Microsoft.Office.Interop.Excel. Still, I could not get over this error - which I believe has its own quick solution. I digged a little bit this site and came