quote:System.Security.SecurityException: Request for the permission of type System.Security.Permissions.SecurityPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed. ....
1 path = "C:\\Test.xls";2 workbook = app.Workbooks.Open(path,Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);3 sheet = (Worksheet)workbook.ActiveSheet;4 excelCell = (Range) sheet.get_Range("B2", "B2");5 String test = excelCell.Value2;