![]() |
Telelogic DOORS (steve huntington) | ![]() |
Topic Title: "Enhanced Export To Excel" and Exporting Doors Tables into Excel using "Paste Picture Link" Topic Summary: Created On: 21-May-2004 19:07 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: Well I have succeeded in my quest. I had to define a new object (cPropertyPictures), and initialize it (see the code). Once that was done I could paste to the objPictures with a link, and voila there it was!!!. I am attaching my code in case someone else may find the "framework" useful. Much Thanks to Michael Sutherland since now I have a way (at least for most of our documents) for doing a very clean export to excel, including the DOORs tables (always a problem - but not anymore). Here are the basic changes. The full code is attached Carlton | |
![]() |
|
Hi All,
I have been using the "Enhanced Export To Excel" scripts by Galactic and have come across what I think may be a solution to the exporting of DOORs Tables (btw Great Job Guys!!). This may be long winded so bear with me. Excel has a feature called "Paste Picture Link". It is hidden and requires the use of the shift key to use. What this allows you to do is select a range of cells (say on one sheet) and copy them as a picture to a cell in another sheet. The picture can be resized accordingly and given all of the attributes of any other picture in Excel. The Enhanced Export tool does everything well except tables. I realize that it was a point of discussion at one of the conferences, but I couldn't find any resolution, so I thought one possibility would be the following. That is why couldn't the exporter be modified to export DOORs tables to a secondary worksheet. Have the range of those exported cells copied and pasted as a "picture link" back into the first worksheet much like the other pictures that are exported. In this way the look of the final export will contain a much cleaner look and include tables. Also as an added benefit the tables that were exported are still available as individual cells (just double click the picture to be brought back to the range of cells on the second worksheet). Anyway I will be modifying Galactic's script to export the tables to a second worksheet, however (and here finally is my question) I still do not know which Excel Method to use (via DXL) to highlight the range copy it and paste it as a link. If you read this far then "Does anyone know how to instruct Excel to select a range of Cells, copy it to the clipboard, and then paste it as a picture link, back into another cell within the same document (all being driven by DXL of course)?" Thanks for any input! Carlton Edited: 21-May-2004 at 19:09 by Carlton Rubio |
|
![]() |
|
![]() |
|
Hi Again,
Here is the code for exporting tables from DOORs to Excel. I am sure there are a number of ways this could be done, but this is pretty straightforward. Anyway if anyone has an idea on which methods to use (in DXL) to select a range of cells in Excel, then copy them, and finally paste them as a Picture Link, I would be most grateful. Hope this helps someone else too! Carlton |
|
![]() |
|
![]() |
|
Carlton,
Interesting idea. One thing you have not considered is that DOORS allows for non-uniform tables. Each row can have a different number of cells, and cells can span rows. Given this, some DOORS tables are difficult to represent in the uniform grid of an Excel worksheet. The idea I would like to implement is to have Word render the table, and paste it into Excel as an OLE object. We haven't completed such an implementation as of yet. ------------------------- Michael Sutherland michael@galactic-solutions.com http://galactic-solutions.com |
|
![]() |
|
![]() |
|
Hi Michael,
First I can't tell you how much I have learned from your application, so Big Thanks There. Most of our tables here are straight-forward 2D and as such would be easy to render in Excel. I am currently still plugging away and have made progress selecting the cells I need using: objRange = excelSetRangeVBA( objSheet, "A1:C4") excelSelectRangeVBA(objRange) My next step is to do the copy and then the paste special (with linking set to true). I am close and will post the code when I can. As far as uneven tables go, one could also "square or rectangularize" the table, so even if the rows do not have a uniform cell distribution we would take the maximum sized row and use that as a width. Hopefully the height won't be a problem. Anyway thanks for the response, it was good to hear from you. Carlton |
|
![]() |
|
![]() |
|
Hi Again,
Well I am on the verge of success except I ran into one roadblock. It seems that when I paste into excel the range doesn't get pasted as a linked picture of cells, instead all the cells get pasted. Ideally I am trying to implement the following VBA in DXL: Selection.Copy 'I got this in DXL Range("I1").Select 'I also figured this one out in DXL ActiveSheet.Pictures.Paste(Link:=True).Select 'this is the hard one. If I can get the answer to this the nut is cracked Can someone help me? Thanks for any help, Carlton |
|
![]() |
|
![]() |
|
Well I have succeeded in my quest. I had to define a new object (cPropertyPictures), and initialize it (see the code). Once that was done I could paste to the objPictures with a link, and voila there it was!!!. I am attaching my code in case someone else may find the "framework" useful.
Much Thanks to Michael Sutherland since now I have a way (at least for most of our documents) for doing a very clean export to excel, including the DOORs tables (always a problem - but not anymore). Here are the basic changes. The full code is attached Carlton |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.