D
dragonemp
I have a windows service using office 2003 PIA to create/read excel
spreadsheets. and it works fine on xp or windows server 2003.
However when I move to windows server 2008, it always have problem on this
line:
_workBook.SaveAs(excelPhysicalFilePath,Excel.XlFileFormat.xlWorkbookNormal,null,null,false,false,Excel.XlSaveAsAccessMode.xlExclusive,false,false,null,null,null) ;
or
_workBook = (Excel.Workbook)(excelApp.Workbooks.Open(templatePath,0, false,
5, "", "", false, Excel.XlPlatform.xlWindows, "",true, false, 0, true, false,
false));
the error is System.Runtime.InteropServices.COMException (0x800A03EC):
Exception from HRESULT: 0x800A03EC
Please note, on a windows form app I created for testing purpose, the exact
same code runs fine. I can create/read file just fine.
So I assume it has something to do with the new way service/DCOM is handled
on windows server 2008/vista, can somebody help me solve the issue?
I also have another question for windows server 2008, in DCOM Config, I
tried change permission for some objects, however , property screens for few
of them are grayed out so I can't edit permission, any idea how I can change
the permission for these components?
spreadsheets. and it works fine on xp or windows server 2003.
However when I move to windows server 2008, it always have problem on this
line:
_workBook.SaveAs(excelPhysicalFilePath,Excel.XlFileFormat.xlWorkbookNormal,null,null,false,false,Excel.XlSaveAsAccessMode.xlExclusive,false,false,null,null,null) ;
or
_workBook = (Excel.Workbook)(excelApp.Workbooks.Open(templatePath,0, false,
5, "", "", false, Excel.XlPlatform.xlWindows, "",true, false, 0, true, false,
false));
the error is System.Runtime.InteropServices.COMException (0x800A03EC):
Exception from HRESULT: 0x800A03EC
Please note, on a windows form app I created for testing purpose, the exact
same code runs fine. I can create/read file just fine.
So I assume it has something to do with the new way service/DCOM is handled
on windows server 2008/vista, can somebody help me solve the issue?
I also have another question for windows server 2008, in DCOM Config, I
tried change permission for some objects, however , property screens for few
of them are grayed out so I can't edit permission, any idea how I can change
the permission for these components?