遇到 ApplicationException 发生“无效文件格式”异常
代码详情:
// Step:1 load the log file
private static String logFilePath =Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "XYZ", "ABC", "Log") + "\\log.xls";
C1XLBook logBook = new C1XLBook();
logBook.Load(logFilePath);
XLSheet logSheet = logBook.Sheets[0];
异常堆栈跟踪
at C1.C1Excel.C1XLBook.(String msg, Boolean badArgument)
at C1.C1Excel.C1XLBook.(String msg)
at C1.C1Excel.C1XLBook.(String fileName, Boolean fillSheets)
at C1.C1Excel.C1XLBook.Load(String fileName, FileFormat format, Boolean fillSheets)
at C1.C1Excel.C1XLBook.Load(String fileName)
在这条线上获得异常
XLSheet logSheet = logBook.Sheets[0];