I have problem in my project.I want to write data into exist excel file in Asp.NET C# on Windows 2008 server . I created project on my local computer and it is working properly but When I published on server I get this error: The Error
:System.Runtime.InteropServices.COMException (0x800A03EC):
Exception from HRESULT: 0x800A03EC at Microsoft.Office.Interop.Excel._Workbook.SaveAs(Object Filename,Object FileFormat, Object Password, Object WriteResPassword, Object ReadOnlyRecommended, Object CreateBackup, XlSaveAsAccessMode AccessMode, Object ConflictResolution, Object AddToMru, Object TextCodepage, Object TextVisualLayout, Object Local)
at Stock.EService.ReadExistingExcel()
Here is save file code:
mWorkBook.SaveAs(path3, Excel.XlFileFormat.xlWorkbookNormal, Missing.Value, Missing.Value, false, false, Excel.XlSaveAsAccessMode.xlNoChange,Excel.XlSaveConflictResolution.xlUserResolution, true,Missing.Value, Missing.Value, Missing.Value);
mWorkBook.Close(true, Missing.Value,Missing.Value);
How can solve my problem.I create a file in server and gave full control but my project does not work. Please help me.
Aucun commentaire:
Enregistrer un commentaire