Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: Saving an excel file
Topic Summary:
Created On: 22-May-2006 21:13
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
Answer This question was answered by Dawn Voss, on Monday, May 22, 2006 10:02 PM

Answer:
Found an old answer sometimes the "search" tool comes in handy... oleMethod(excelApplication, "Quit")
 22-May-2006 21:13
User is offline View Users Profile Print this message


Dawn Voss

Posts: 8
Joined: 6-Mar-2006

Help,
   This code has been tweaked from another source, but it never works for me .  I open and write to excel after gaining a handle on the Excel object, workbooks and workbook objects, activesheet object, etc...
Any suggestions?

void SaveFile (string exportDir, string expName, OleAutoObj exHandle, OleAutoObj wkHandle)
{  
 OleAutoArgs args = create
 expName =expName".xls"
 clear( args )
    put( args, "FileName", exportDir expName )
    oleMethod( wkHandle, "SaveAs", args )


// close the Excel file and then disconnect from Excel
    clear( args )
    put( args, "SaveChanges", false)
  oleMethod( wkHandle, "Close", args )  
  
  print "Saving to "exportDir" "expName"\n"
  disconnectFromApp exHandle  //this throws an error here?
}

Report this to a Moderator Report this to a Moderator
 22-May-2006 21:51
User is offline View Users Profile Print this message


Dawn Voss

Posts: 8
Joined: 6-Mar-2006

This code works - I found my error, I just can't get Excel to close out.
Report this to a Moderator Report this to a Moderator
 22-May-2006 22:02
User is offline View Users Profile Print this message


Dawn Voss

Posts: 8
Joined: 6-Mar-2006

Answer Answer
Found an old answer sometimes the "search" tool comes in handy... oleMethod(excelApplication, "Quit")
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 0 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 0 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.