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: Problem getting rich text into Excel
Topic Summary:
Created On: 1-Feb-2007 17:46
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 David Pechacek, on Thursday, February 1, 2007 9:09 PM

Answer:
Well after finding and fixing that bug with the deltaText() function in /DOORS/lib/dxl/example/include/delta.inc I got it working.

Also had to get the delta text, strip the RTF markup off it, and initially set the cell equal to that instead of setting the cell to the RTF marked text.

So the code I used ended up being:

The stripRichText, and excelSetCellRichText functions are all in the Enhanced Export to Excel script from Galactic Solutions. 
 1-Feb-2007 17:46
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

Been working at this a while now.  What I'm doing is writing a script that filters some of our modules by user selectable attributes.  It compares the current value of the attribute in an object to the value of that attribute from the same object in a user selected baseline.  Then filters the differences.

It also is has the option to write the differences to an Excel file.  With the Excel file though, I want to have the differences marked up.  I'm using the delta.inc file from the /dxl/examples/includes directory and using its deltaText() function.

So I get the delta text with RTF markup string and assign it to the value of the cell.  Then, following a PDF document from Galactic Solutions, I copied and pasted the excelSetRichText() function (and required sub functions) from their Enhanced Excel Exporter.  I pass it the proper cell and once again the marked up delta text. 

What is not happening is that it is not properly formatting the rich text in Excel.  It just either skips most of the text and leaves it alone or makes the rich text markup rich text itself(still with me?). 

Am I doing something wrong here? Also is there any way to just copy the rich text to the clipboard (yes I know I can do this) and paste it into Excel?  I copied it onto the clipboard but then when (using OLE DXL) I select the proper cell and call checkRes(oleMethod(objCell, "Paste")) I get an error saying that the argument names are wrong.  I also tried using a handle to the sheet instead of the cell(since from recording a macro I saw that the VB code had ActiveSheet.Paste) and got a similiar error.

Here's a bit of the code.

Edit:  I've also found that the deltaText function is returning to me incorrect values sometimes.  If the old value passed to it is equal to "NR" and the new value is nothing, then I'm getting "GOGONR" as a result.  Has anyone else had issues like this with this function? 

Maybe they've got an Inspector Gadget engine running DXL...



-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com

Edited: 1-Feb-2007 at 19:57 by David Pechacek
Report this to a Moderator Report this to a Moderator
 1-Feb-2007 21:08
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

Answer Answer
Well after finding and fixing that bug with the deltaText() function in /DOORS/lib/dxl/example/include/delta.inc I got it working.

Also had to get the delta text, strip the RTF markup off it, and initially set the cell equal to that instead of setting the cell to the RTF marked text.

So the code I used ended up being:

The stripRichText, and excelSetCellRichText functions are all in the Enhanced Export to Excel script from Galactic Solutions. 

-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 2 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 2 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.