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: How to search and replace object text with paragraph marks
Topic Summary:
Created On: 29-Jul-2008 20:58
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.
 29-Jul-2008 20:58
User is offline View Users Profile Print this message


David Dawson

Posts: 27
Joined: 11-Mar-2003

Here's a problem I hope will have a simple solution, but I've learned not to set my hopes too high, so if not, oh well.

I have a Word document that is a table, but I don't want it imported as a table. The table has a single column which contains text destined to be object text, and other columns containing data destined to be attributes. So far, so good. All I need to do is paste the table into Excel and then import the spreadsheet. Well, not quite.

The problem is that some of the cells in Word contain paragraph marks, which forces multiple cells (and rows) into Excel. Multiple rows equal multiple DOORS objects, which I don't want. The quick and dirty way to avoid the problem going from Word to Excel is to replace the paragraph marks with some other characters (such as ~~~); now one Word cell equals one Excel cell (say that three times, fast). Imports into DOORS as nicely as can be.

But, once it is in DOORS, how do I search for ~~~ and replace them with paragraph marks?

-------------------------
You never know where you're going 'til you get there

Edited: 29-Jul-2008 at 21:50 by David Dawson
Report this to a Moderator Report this to a Moderator
 29-Jul-2008 21:26
User is offline View Users Profile Print this message


Bob Mathis

Posts: 32
Joined: 12-Apr-2005

You need an Excel Macro:

Public Sub ReplaceCR()

Selection.Cells.Replace what:="~~~", replacement:=Chr(10), _
lookat:=xlPart, searchorder:=xlByRows, MatchCase:=False, _
SearchFormat:=False, ReplaceFormat:=False

End Sub


Then select all the cells that you want to run the replacement on and run this macro.

Bob

-------------------------
Bob Mathis
Robert.S.MATHIS@odot.state.or.us
Report this to a Moderator Report this to a Moderator
 29-Jul-2008 21:53
User is offline View Users Profile Print this message


David Dawson

Posts: 27
Joined: 11-Mar-2003

D'oh! Guess I need a little more coffee.

I was so intent on getting the Excel into DOORS that I completely forgot I could simply make the correction via code in Excel.

Thanks for rousing me from my slumber.

For future reference though; is there a quick and dirty way to do this in DOORS, or is it going to require a bit o' dxl?

david

-------------------------
You never know where you're going 'til you get there
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.