程序在win7下能正常运行,在windows server 2008下不能打开。提示配置不正确,不能正常启动,这个程序也没有什么需要配置的
æ¨å¤©ï¼ç»éä¸ä¸ªå°æååè¯æï¼ä»åçæ¥è¡¨çææå¡ä¸æ æ³æå¼ä¸ä¸ªå·²ç»åå¨çExcel 2007æ件ï¼ä»çå¼åç¯å¢æ¯Win7ãVisual Studio .Net 2008(Windows Server 2008ä¸åæ ·åå¨æ¤é®é¢)ãæ¯è¾å¥æªçæ¯ï¼Excel Automation对象æ¯å¯ä»¥å®ä¾åçï¼ä½æ¯å¨æ§è¡Workbooks.Openæ¶æåºå¼å¸¸å¦ä¸ï¼
Microsoft Office Excel ä¸è½è®¿é®æ件âa.xlsâã å¯è½çåå æ:
• æ件å称æè·¯å¾ä¸åå¨ã
• æ件æ£è¢«å ¶ä»ç¨åºä½¿ç¨ã
• æ¨æ£è¦ä¿åçå·¥ä½ç°¿ä¸å½åæå¼çå·¥ä½ç°¿ååã_Microsoft Office Excel_ å¨ TemplateExcelFileExporter.Create(DataSet ds, String fullName) ä½ç½® E:\Demos\ExportService\ExportService\Class1.cs:è¡å· 263
å¨ ExportService.Service1.OnStart(String[] args) ä½ç½® E:\Demos\ExportService\ExportService\Service1.cs:è¡å· 30
äºå®ä¸ï¼a.xlsæ件æ¯åå¨çï¼èåæ ·ç代ç å¨éServiceç¨åºæ¯æ£å¸¸çï¼ä¸Serviceé¨ç½²å°Windows Server 2003ä¸è¿è¡æ£å¸¸ãæä¸å¾ä¸æçæ¯æéé®é¢ï¼æå¡æ¯ä»¥Local Systemè¿è¡çï¼å¨ç»å·¥ä½ç®å½å ä¸äºç¸åºçæéååç°é®é¢ä¾æ§ãæ å¥ï¼ä¸ç½å»è½¬äºä¸åï¼æ¾å°äºä¸ä¸ªè§£å³æ¹æ¡ï¼ä»¥ä¸æ¯å ¶ä¸å ³é®çé¨åï¼
This solution is ...
・Windows 2008 Server x64
Please make this folder.
C:\Windows\SysWOW64\config\systemprofile\Desktop
・Windows 2008 Server x86
Please make this folder.
C:\Windows\System32\config\systemprofile\Desktop
...instead of dcomcnfg.exe.
This operation took away office automation problems in my system.
A Desktop folder seems to be necessary in the systemprofile folder to open file by Excel.
It disappears from Windows2008, Windows2003 had the folder,
and I think it cause this error.
è½ç¶é®é¢è§£å³äºï¼ä½æ¯ä¸ºä»ä¹å¨X:\Windows\System32\config\systemprofileç®å½ä¸å建å为Desktopç®å½å³å¯è§£å³é®é¢ï¼è¿ä¸ªè¿ä¸æ¯å¾æ¸ æ¥ã继ç»æ¥äºä¸äºèµæï¼åºè¯¥è¿æ¯æéçé®é¢ï¼å 为æ 论Windows Serviceè¿è¡å¨åªä¸ªå¸å·ä¸ï¼å®æå建çæ件çOwneré½æ¯Administratorï¼å æ¤Excelæ æ³æå¼æ¤æ件ãä½ä¸ºå¥ä¸å®è¦å»ºä¸ä¸ªç©ºçDesktopç®å½ï¼ä»æªæ¾å°çæ¡ãå¦æåªä½é«ä»·ç¥éï¼è¯·ä¸åèµæã
Microsoft Office Excel ä¸è½è®¿é®æ件âa.xlsâã å¯è½çåå æ:
• æ件å称æè·¯å¾ä¸åå¨ã
• æ件æ£è¢«å ¶ä»ç¨åºä½¿ç¨ã
• æ¨æ£è¦ä¿åçå·¥ä½ç°¿ä¸å½åæå¼çå·¥ä½ç°¿ååã_Microsoft Office Excel_ å¨ TemplateExcelFileExporter.Create(DataSet ds, String fullName) ä½ç½® E:\Demos\ExportService\ExportService\Class1.cs:è¡å· 263
å¨ ExportService.Service1.OnStart(String[] args) ä½ç½® E:\Demos\ExportService\ExportService\Service1.cs:è¡å· 30
äºå®ä¸ï¼a.xlsæ件æ¯åå¨çï¼èåæ ·ç代ç å¨éServiceç¨åºæ¯æ£å¸¸çï¼ä¸Serviceé¨ç½²å°Windows Server 2003ä¸è¿è¡æ£å¸¸ãæä¸å¾ä¸æçæ¯æéé®é¢ï¼æå¡æ¯ä»¥Local Systemè¿è¡çï¼å¨ç»å·¥ä½ç®å½å ä¸äºç¸åºçæéååç°é®é¢ä¾æ§ãæ å¥ï¼ä¸ç½å»è½¬äºä¸åï¼æ¾å°äºä¸ä¸ªè§£å³æ¹æ¡ï¼ä»¥ä¸æ¯å ¶ä¸å ³é®çé¨åï¼
This solution is ...
・Windows 2008 Server x64
Please make this folder.
C:\Windows\SysWOW64\config\systemprofile\Desktop
・Windows 2008 Server x86
Please make this folder.
C:\Windows\System32\config\systemprofile\Desktop
...instead of dcomcnfg.exe.
This operation took away office automation problems in my system.
A Desktop folder seems to be necessary in the systemprofile folder to open file by Excel.
It disappears from Windows2008, Windows2003 had the folder,
and I think it cause this error.
è½ç¶é®é¢è§£å³äºï¼ä½æ¯ä¸ºä»ä¹å¨X:\Windows\System32\config\systemprofileç®å½ä¸å建å为Desktopç®å½å³å¯è§£å³é®é¢ï¼è¿ä¸ªè¿ä¸æ¯å¾æ¸ æ¥ã继ç»æ¥äºä¸äºèµæï¼åºè¯¥è¿æ¯æéçé®é¢ï¼å 为æ 论Windows Serviceè¿è¡å¨åªä¸ªå¸å·ä¸ï¼å®æå建çæ件çOwneré½æ¯Administratorï¼å æ¤Excelæ æ³æå¼æ¤æ件ãä½ä¸ºå¥ä¸å®è¦å»ºä¸ä¸ªç©ºçDesktopç®å½ï¼ä»æªæ¾å°çæ¡ãå¦æåªä½é«ä»·ç¥éï¼è¯·ä¸åèµæã
温馨提示:答案为网友推荐,仅供参考