Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel hang when SaveAs
Dear all,
My environment:- Windows Server 2003 Office XP with SP3 dotnet 1.1 with SP1 ASP.net with VB Com dll. The following code (in VB com dll) is working fine when Excel file is without Macros :- Set xlApp1 = New Excel.Application xlApp1.EnableEvents = False Set xlWBook = xlApp1.Workbooks.Open(sourcefile, False, , , Passwd) xlApp1.EnableEvents = True Dim filename As String filename = "ABC.xls" On Error Resume Next Kill filename Method #1:- xlWBook.SaveAs filename, , "" -- No error, Excel hang in Task Manager Method #2:- xlApp1.EnableEvents = False xlApp1.DisplayAlerts = False xlWBook.SaveAs filename, , "" -- Error! Document not saved. If I manually open the excel file through Excel Application, I am able to save as another file without error. Does anyone know how to fix this. Thanks in advance. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel hang when SaveAs
Is it possible to delete/remove/disable macro when saveas?
Thanks. "cct" wrote in message ... Dear all, My environment:- Windows Server 2003 Office XP with SP3 dotnet 1.1 with SP1 ASP.net with VB Com dll. The following code (in VB com dll) is working fine when Excel file is without Macros :- Set xlApp1 = New Excel.Application xlApp1.EnableEvents = False Set xlWBook = xlApp1.Workbooks.Open(sourcefile, False, , , Passwd) xlApp1.EnableEvents = True Dim filename As String filename = "ABC.xls" On Error Resume Next Kill filename Method #1:- xlWBook.SaveAs filename, , "" -- No error, Excel hang in Task Manager Method #2:- xlApp1.EnableEvents = False xlApp1.DisplayAlerts = False xlWBook.SaveAs filename, , "" -- Error! Document not saved. If I manually open the excel file through Excel Application, I am able to save as another file without error. Does anyone know how to fix this. Thanks in advance. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel hang when SaveAs
Hi
Are you automation Excel in the Server side, i.e. in the ASP.NET code? We did not recommend automation Office Product in serverside because office product is designed for desktop interactive operation. Here is a KB article for your reference. This article discusses the complications that developers may face, offers alternatives to Automation that can speed performance, and suggests ways to configure Office if server-side Automation is unavoidable. Developers should be aware, however, that the suggestions provided below are for informational purposes only. Microsoft does not recommend or support server-side Automation of Office. NOTE: In this context, the term "server-side" also applies to code that is running on a Microsoft Windows NT or Microsoft Windows 2000 workstation, provided that it is running from a WinStation other than the interactive station of the user that is logged on. For example, code that is started by Task Scheduler under the SYSTEM account runs in the same environment as "server-side" ASP or DCOM code, and therefore experiences many of the same issues. For more information on WinStations and COM, see the "More Information" and "References" sections. INFO: Considerations for Server-Side Automation of Office http://support.microsoft.com/default...b;en-us;257757 Best regards, Peter Huang Microsoft Online Partner Support Get Secure! - www.microsoft.com/security This posting is provided "AS IS" with no warranties, and confers no rights. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Application Hang with Excel | Excel Discussion (Misc queries) | |||
Excel Application hang | Excel Discussion (Misc queries) | |||
Excel Attachments Hang | Excel Discussion (Misc queries) | |||
excel hang | Excel Discussion (Misc queries) | |||
Excel seems to hang and cause asp script to timeout. | Excel Programming |