Cannot implicitly convert type 'object' to 'Microsoft.Office.Interop.Excel.Worksheet'. An explicit conversion exists (are you missing a cast?) throws up when there is no Explicit casting - (Excel.Worksheet)
Excel.Worksheet oWS =oWB.Worksheets[1];
To
Excel.Worksheet oWS = (Excel.Worksheet)oWB.Worksheets[1];
No comments:
Post a Comment