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: "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
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 Carlton Rubio, on Tuesday, May 25, 2004 11:04 PM

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
 21-May-2004 19:07
User is offline View Users Profile Print this message


Carlton Rubio

Posts: 23
Joined: 22-Jan-2003

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
Report this to a Moderator Report this to a Moderator
 24-May-2004 18:17
User is offline View Users Profile Print this message


Carlton Rubio

Posts: 23
Joined: 22-Jan-2003

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
Report this to a Moderator Report this to a Moderator
 24-May-2004 20:36
User is offline View Users Profile Print this message


Michael Sutherland

Posts: 248
Joined: 13-Sep-2002

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
Report this to a Moderator Report this to a Moderator
 24-May-2004 22:03
User is offline View Users Profile Print this message


Carlton Rubio

Posts: 23
Joined: 22-Jan-2003

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
Report this to a Moderator Report this to a Moderator
 24-May-2004 23:52
User is offline View Users Profile Print this message


Carlton Rubio

Posts: 23
Joined: 22-Jan-2003

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
Report this to a Moderator Report this to a Moderator
 25-May-2004 23:04
User is offline View Users Profile Print this message


Carlton Rubio

Posts: 23
Joined: 22-Jan-2003

Answer 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
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 0 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 0 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.