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: How to open an existing excel file through dxl
Topic Summary:
Created On: 11-Sep-2007 16:27
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.
 11-Sep-2007 16:27
User is offline View Users Profile Print this message


Subrojyoti Sengupta

Posts: 52
Joined: 18-Nov-2005

Can any one suggest me how to open an existing excel file from my local drive through dxl script.
Report this to a Moderator Report this to a Moderator
 11-Sep-2007 16:40
User is offline View Users Profile Print this message


Kevin Murphy

Posts: 206
Joined: 15-Jul-2005

Subrojyoti,

The code below should get you started.

-------------------------
Kevin Murphy
http://www.baselinesinc.com
The Requirements Management Experts
Report this to a Moderator Report this to a Moderator
 13-Sep-2007 07:39
User is offline View Users Profile Print this message


Subrojyoti Sengupta

Posts: 52
Joined: 18-Nov-2005

Hi Kevin,

            Thanks for your help.....

It worked with slight modification FileName instead of File.

Regards,
Subrojyoti

Report this to a Moderator Report this to a Moderator
 26-Mar-2008 18:39
User is offline View Users Profile Print this message


Scott Boisvert

Posts: 348
Joined: 14-Apr-2006

Looking for some help with this. I tried Kevin's script above as is and making the "FileName" modification Subrojyoti suggested. However a blank Excel file opens, I tried printing the result of the oleMethod and get the following error:

Problem with OLE Argument names.

Running DOORS 8.1 and Excel 2003, any ideas?

-------------------------
Scott Boisvert
Engineering Tools Administrator
L-3 Communications - Avionics Systems
scott.boisvert@l-3com.com
Report this to a Moderator Report this to a Moderator
 26-Mar-2008 19:35
User is offline View Users Profile Print this message


Kevin Murphy

Posts: 120
Joined: 16-Jan-2008

My bad guys!

The Excel Application Object doesn't open, the Workbooks object opens...so the last three lines should be:

-------------------------
Kevin Murphy
http://www.baselinesinc.com
Report this to a Moderator Report this to a Moderator
 30-Apr-2008 08:59
User is offline View Users Profile Print this message


Karl Breuer

Posts: 66
Joined: 11-Jul-2005

Hm, not sure if this thread is about what I am looking for ...

I want to open an excel file to export a module into it with the module name set as the filename of the excel.

Using the code above I don't see where I have to assign the module name to filename ...

can somebody help?

Karl
Report this to a Moderator Report this to a Moderator
 30-Apr-2008 13:47
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

Here is a function I use.

-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
Report this to a Moderator Report this to a Moderator
 30-Apr-2008 16:20
User is offline View Users Profile Print this message


Karl Breuer

Posts: 66
Joined: 11-Jul-2005

David,

thanks for your response.
but, leaves me clueless.
I don't know what to do with it.

Karl
Report this to a Moderator Report this to a Moderator
 5-May-2008 13:42
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

You have your OleAutoObj handle to your workbook and a OleAutoArgs variable called args(which stores info to pass to the OLE function call such as the file name). For me the workbook handle and args variable are globals (I rewrote my excel functions to not use globals. It ended up being slower for an export). So you just pass that function a file name(with directory path) and it will save the workbook as it.

If you don't use globals, pass your workbook handle to the function as well, create the OleAutoArgs variable inside it, and then perform the action. Basically you're just calling the Save As option in Excel. Be sure to delete the OleAutoArgs variable when the function is done.

-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 2 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 2 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.