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: Copy a table from DOORS to Word
Topic Summary: Select a single table in DOORS ...
Created On: 11-Sep-2008 22:30
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-2008 22:30
User is offline View Users Profile Print this message


Krishna Kandala

Posts: 170
Joined: 8-Jul-2006

Hi All,

Is there any dxl code ( and/or vba macro) to select a single table from DOORS module, copy it and then paste it on a Word document already opened? This would be useful if we have to pick up a single table from DOORS module for a report.

- Krishna
Report this to a Moderator Report this to a Moderator
 11-Sep-2008 23:56
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

Dxl could do this but easier to filter on the table then export to word.
Report this to a Moderator Report this to a Moderator
 12-Sep-2008 21:26
User is offline View Users Profile Print this message


Krishna Kandala

Posts: 170
Joined: 8-Jul-2006

Thanks, Ron.
Suppose we have a large module and we want to pick up just one table to be copied to a Word document. Filtering for the single table to show in the module may need some work to be done. The export to Word will be easy because only one table is to be exported.
I worked out a script that uses the getSelection(Module, Object st, Object end) function. For the range of selected objects, get the object text and store in a buffer along with appropriate "\n" and "\t" characters. Display the buffer contents in the output window. Copy the results and paste in the Word document. By converting the text to a table with a tab delimiter, we can get a table.
However this script has some limitations. The other approach would be to store text of each cell in a skip list. Open the specific Word doc, create a table with the number of columns and rows obtained earlier, and then transfer the contents of the skip list to each cell.
The oleAutoObj statements and the oleMethods are confusing for me. Has anyone worked out a script on these lines?

- Krishna
Report this to a Moderator Report this to a Moderator
 15-Sep-2008 13:27
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

Krishna quote
Filtering for the single table to show in the module may need some work to be done.
.

Krishna,
I am confused by your statement about filtering being some work. In the attached 8 lines of code I accomplished everything you ask for and everyting I suggested.

//ExportTable
/*(c) Ron Lewis 2008*/
Object o =current
if(!null o)if(!cell(o)){ack "Select cell then run"; halt} else load view "Standard view"
delete(column 0)
string s=":" number getTable(o)
for o in (current Module) do if(matches(s,":" number o "")) accept o else reject o
filtering on
#include <\\standard\\export\\office\\word.dxl>
load view "Standard view"

Edited: 15-Sep-2008 at 14:59 by ron lewis
Report this to a Moderator Report this to a Moderator
 15-Sep-2008 16:57
User is offline View Users Profile Print this message


Krishna Kandala

Posts: 170
Joined: 8-Jul-2006

Thanks Ron, for the reply. I thought that once a script is put in place for copying a table to Word doc, this can be applied to any module.
However, as you show, the filtering can be managed as easily as any other script.
Thanks again for the post.

- Krishna
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.