Note: during the execution of the current Web request, abnormal untreated, please check the stack trace, to learn about the errors and mistakes in the code of the source of detailed information,
Exception details: System. IndexOutOfRangeException: unable to find a table 0,
The error source:
Line 138: string filePath=Server. MapPath (" ~ \ \ excel \ \ "). The ToString ();
Line 139: set=ExcelToDS (file, filePath);
Line 140: the for (int a=0; A. & lt; Set the Tables [0]. Columns. The Count; +)
Line 141: {
Line 142: set Tables [0]. Columns [a]. ColumnName=set. The Tables [0]. Rows [0] [a]. ToString ();
CodePudding user response:
Should be set. The Tables [0] error,You may excel no data, leading to set no tables,
Or your ExcelToDS appeared abnormal?
CodePudding user response:
There was no table setCodePudding user response:
Thank you for your reply, I think it should be is a question of authority, because the same code, there is nothing wrong with the same upload files to the local operation,CodePudding user response: