我的环境:WIN7 64, IIS7, VS2010
部署到IIS报错如下:
Microsoft Excel cannot access the file 'C:\APPLICATIONDATA\Temp\SPO\BaiKun\2013-01-16_16-57-41-461\Purchase Order Details\Purchase Order Details.xls'. There are several possible reasons:
• The file name or path does not exist.
• The file is being used by another program.
• The workbook you are trying to save has the same name as a currently open workbook.
Add
Microsoft Excel
at Microsoft.Office.Interop.Excel.Workbooks.Add(Object Template)
at SPR.Common.ExcellDataSet..ctor(String FileName, String sheetName, String rowStart, String colStar, String colEnd) in D:\Project\MC_SPR_UPDATE\MC_SPR_UPDATE\Mcspr_Existing\Common\ExcellDataSet.cs:line 121
at SPR.Common.ReadExcel.ReadExcel_PO(String FilePath, String SheetName, String p_SPRType) in D:\Project\MC_SPR_UPDATE\MC_SPR_UPDATE\Mcspr_Existing\Common\ReadExcel.cs:line 139
**********************************************
ErrorTime: 2013-01-16 16:57:41
ErrorMsg:
读取EXCEL信息出错,读取文件:C:\APPLICATIONDATA\Temp\SPO\BaiKun\2013-01-16_16-57-41-461\Purchase Order Details\Purchase Order Details.xls
4.重新启动IIS,测试通过