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: Need "Export all Modules to Spreadsheet" .dxl
Topic Summary:
Created On: 7-Nov-2002 19:53
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 Andrew Myatt, on Monday, November 11, 2002 2:21 PM

Answer:
Hi,

1) To load a view you must have the module open and visible.

Module mRef = read("my Mod",true)
current Module = mRef
View vn = view ("My View")
if (load(vn)) {
// It worked
}


2) The standard Door->Excel Exporter is in open source code form and can be found at:
<DoorsHome Dir> \lib\dxl\standard\export\office\excel.dxl

Alternatively if you want to export to a CVS file then the code for this can be found at:
<DoorsHome Dir> \lib\dxl\standard\export\comas.dxl

Take a COPY of either of these and convert it into a function without the user interactions, etc and you will have a solution.
 7-Nov-2002 19:53
User is offline View Users Profile Print this message


Robert Perkins

Posts: 8
Joined: 1-Oct-2002

I am looking for code that will automate the export of formal modules to .csv .

The looping-through-all-modules in a project part I've got.

I'm missing the .dxl that shows how to
1. Select a view
2. Do a file-export-spreadsheet

Anybody got this?

Rob
Report this to a Moderator Report this to a Moderator
 8-Nov-2002 14:50
User is offline View Users Profile Print this message


Andrew Myatt

Posts: 8
Joined: 30-Sep-2002

Answer Answer
Hi,

1) To load a view you must have the module open and visible.

Module mRef = read("my Mod",true)
current Module = mRef
View vn = view ("My View")
if (load(vn)) {
// It worked
}


2) The standard Door->Excel Exporter is in open source code form and can be found at:
<DoorsHome Dir> \lib\dxl\standard\export\office\excel.dxl

Alternatively if you want to export to a CVS file then the code for this can be found at:
<DoorsHome Dir> \lib\dxl\standard\export\comas.dxl

Take a COPY of either of these and convert it into a function without the user interactions, etc and you will have a solution.

-------------------------
andrew.myatt@telelogic.com
Report this to a Moderator Report this to a Moderator
 11-Nov-2002 19:26
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Text file export is tricky. CRs and TABs in such a file are designed to separate different columns or lines in the export, yet they can also exist in exported Text attributes (such as Object Text) and have their standard meaning; but will mess up your export since they will be interpreted as column and line ending delimitors. I doubt using commas will help.

if you export to MS-Word you'll get the correct information, but they you want to manually replace existing TABs and CRs to some dummy string; perhaps
Replace all "^p" with "**CR** ",
Replace all "^t" with "**TAB** ".
Then export as a text file. This will make the text report look odd but will preserve the integrity of the implied table format within the text file.

- Louie
Report this to a Moderator Report this to a Moderator
 12-Sep-2008 05:03
User is offline View Users Profile Print this message


anant mitra

Posts: 50
Joined: 27-Jul-2007

Hello,

I'd like to export each and every module in a project to an excel file and save the excel file at a specified location. I'm using the DOORS provided script, excel.dxl to accomplish this and updated it loop through all the modules in the project. I've also tried specifying a view, but the script doesn't performed the desired action. I'd like the script to use the default view in every module; but, I'm not sure how to do it.

I've attached the script. Could anyone please let me know what needs to change in the code to get the desired behavior.

Thank You.

Originally posted by: Andrew Myatt

Hi,

1) To load a view you must have the module open and visible.

Module mRef = read("my Mod",true)
current Module = mRef
View vn = view ("My View")
if (load(vn)) {
// It worked
}


2) The standard Door->Excel Exporter is in open source code form and can be found at:
<DoorsHome Dir> \lib\dxl\standard\export\office\excel.dxl

Alternatively if you want to export to a CVS file then the code for this can be found at:
<DoorsHome Dir> \lib\dxl\standard\export\comas.dxl

Take a COPY of either of these and convert it into a function without the user interactions, etc and you will have a solution.
Report this to a Moderator Report this to a Moderator
 12-Sep-2008 15:18
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

anant,

Trying chaning line: mod = read(path_name, false)
to: mod = read(path_name, true)

Also include a close mod after your done with the module.

Edited: 12-Sep-2008 at 15:19 by ron lewis
Report this to a Moderator Report this to a Moderator
 15-Sep-2008 19:39
User is offline View Users Profile Print this message


anant mitra

Posts: 50
Joined: 27-Jul-2007

Ron,

I made changes you suggested. I see the modules opening in the background, that's all. It's not exporting the modules to an excel spreadsheet. Also, I want the "Default View" to be exported, not the standard view.

Thanks.
Report this to a Moderator Report this to a Moderator
 15-Sep-2008 20:24
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

anant, If I read you right, you want to put every module output into a single excel file. This logic of this is not readily apparent to me. Since, in theory every module would have a different heading row.

Can you explain.

To put the output of every module in its own excel file would seem more logical to me.


Also, you might want to consider galatic exporter which includes ole objects in output.
Report this to a Moderator Report this to a Moderator
 15-Sep-2008 21:02
User is offline View Users Profile Print this message


anant mitra

Posts: 50
Joined: 27-Jul-2007

Actually, I do want each module to be a separate csv file (just got the clarification).
Report this to a Moderator Report this to a Moderator
 15-Sep-2008 21:09
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

If you want csv files -- you need to abandon the excel source code and start with
file named commas.dxl
Report this to a Moderator Report this to a Moderator
 15-Sep-2008 21:23
User is offline View Users Profile Print this message


anant mitra

Posts: 50
Joined: 27-Jul-2007

Ron,

The commas.dxl doesn't have any comments in it. Also, does it need to be run on a module or a folder? I tried running it on both, a module and a folder, but nothing happens.
Report this to a Moderator Report this to a Moderator
 15-Sep-2008 22:01
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

I belive there are multiple commas.dxl on your client.


You want the one at ....\lib\dxl\standard\export\commas.dxl

And it works from the module -- but you will want to change it to work at a project level.
Report this to a Moderator Report this to a Moderator
 15-Sep-2008 22:25
User is offline View Users Profile Print this message


anant mitra

Posts: 50
Joined: 27-Jul-2007

Ron,

Does the script also handle exporting of OLE tables?

Thanks.
Report this to a Moderator Report this to a Moderator
 16-Sep-2008 00:14
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

CSV files offer no for Ole objects since a csv files is a text file.

Edited: 16-Sep-2008 at 12:49 by ron lewis
Report this to a Moderator Report this to a Moderator
 16-Sep-2008 17:28
User is offline View Users Profile Print this message


anant mitra

Posts: 50
Joined: 27-Jul-2007

Well, since we need the OLE objects as well, I'll have to do an export to Word.
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 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 1 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.