Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default The remote procedure call failed. (Exception from HRESULT: 0x80070

Hi

I have a code like follows.....I am using Windows 2000 server.....to
generate excel template....and i am getting the following error....

=====================================

Exception Type: System.Runtime.InteropServices.COMException
Exception: The remote procedure call failed. (Exception from HRESULT:
0x800706BE)
Source: createtemplate
Page Name:systemdefaults_aspx
Stack Trace:
at Microsoft.Office.Interop.Excel.WorkbookClass.SaveA s(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 SystemDefaults.createtemplate()

======================================

Exception Type: System.Runtime.InteropServices.COMException
Exception: The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
Source: Application_Error
Page Name:Global.asax
Stack Trace:
at Microsoft.Office.Interop.Excel.ApplicationClass.ge t_Workbooks()
at SystemDefaults.createtemplate()
at SystemDefaults.GenerateExl_Click(Object sender, EventArgs e)
at System.Web.UI.WebControls.LinkButton.OnClick(Event Args e)
at System.Web.UI.WebControls.LinkButton.RaisePostBack Event(String
eventArgument)
at
System.Web.UI.WebControls.LinkButton.System.Web.UI .IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
===============================================



code as follow.....





.........

.......

excelWorkBook.SaveAs(Server.MapPath("Template/" + version), Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Microsoft.Office.Interop.Excel.XlSaveAsAccessMode. xlNoChange, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing);
excelWorkSheet.Protect(password, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing);
excelWorkBook.Save();
excelApplication.Quit();

================================================== ====



any solution?








Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run-time Error '5' - Invalid procedure call or argument Trefor Excel Discussion (Misc queries) 2 December 17th 07 04:32 AM
to call procedure in a worksheet in a module CAPTGNVR Excel Discussion (Misc queries) 4 January 30th 07 10:39 PM
Exception from HRESULT: 0x800A03EC nano2k New Users to Excel 0 July 21st 06 12:15 PM
Exception from HRESULT: 0x800AC472 [email protected] Excel Discussion (Misc queries) 0 May 30th 06 09:01 PM
Run-time error '5': Invalid Procedure Call or Argument Nikila Excel Discussion (Misc queries) 2 February 24th 06 10:26 PM


All times are GMT +1. The time now is 07:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"