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: Adding a new Sheet Name in Excel
Topic Summary:
Created On: 5-Apr-2004 17:19
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 Janet Ma, on Tuesday, April 13, 2004 5:06 PM

Answer:
Thanks Dennis, I tried it and it's exactly what I was looking for
 5-Apr-2004 17:19
User is offline View Users Profile Print this message


Janet Ma

Posts: 115
Joined: 12-Sep-2002

Hi:

I am iterating through a project and would like to export the module names in a folder to new worksheets in Excel.

I am having trouble writing the OLE function calls to Excel to add new worksheet.

Can anybody help?
Report this to a Moderator Report this to a Moderator
 5-Apr-2004 18:03
User is offline View Users Profile Print this message


Dennis Lockshine

Posts: 113
Joined: 7-Apr-2003

The attached code will create a new worksheet, select it, and give it the supplied name. The sheet will be added as the first one, with the others moving to the right.

You will need to ensure all of your variables have been defined prior to using this code.

-Dennis
Report this to a Moderator Report this to a Moderator
 5-Apr-2004 23:58
User is offline View Users Profile Print this message


Janet Ma

Posts: 115
Joined: 12-Sep-2002

Thanks Dennis, I'll try this. one more question, what is the vbaCheckRes function?

Is it a built in DOORS function or a user defined function to check if the OLE function call does not return null?

--Janet
Report this to a Moderator Report this to a Moderator
 6-Apr-2004 13:33
User is offline View Users Profile Print this message


Dennis Lockshine

Posts: 113
Joined: 7-Apr-2003

The vbaCheckRes function I'm referring to was taken from the DOORS standard Word exporter and is used to check the status of any vba call, such as oleMethod, oleGet, or olePut. It is simply a function that accepts a string as input, and if the string is non-null, it will display an error dialog and handle the error.

You can also remove the call to vbaCheckRes(...) out of the sample code I provided earlier and the script will function just as well.

Below is the standard function and one I modified to simply report the error.

-Dennis


Edited: 6-Apr-2004 at 13:35 by Dennis Lockshine
Report this to a Moderator Report this to a Moderator
 13-Apr-2004 17:06
User is offline View Users Profile Print this message


Janet Ma

Posts: 115
Joined: 12-Sep-2002

Answer Answer
Thanks Dennis, I tried it and it's exactly what I was looking for
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.