![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
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 |
![]() |
![]()
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
Dxl could do this but easier to filter on the table then export to word.
|
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Copy a table from DOORS to Word
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.