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: Issue displaying multiple attribute values in one column in an exported CSV
Topic Summary:
Created On: 12-Sep-2007 16:48
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 ron lewis, on Monday, September 17, 2007 3:45 PM

Answer:
Your problem is due to not following the specification for what consititues a comma delimited file.

You are using a stripped down version of what a csv file is.

If you look up the standard you will find that:

--Each record is one line - Line separator may be LF (0x0A) or CRLF (0x0D0A), a line seperator may also be embedded in the data (making a record more than one line but still acceptable).
--Fields are separated with commas.
--Leading and trailing whitespace is ignored - Unless the field is delimited with double-quotes in that case the whitespace is preserved.
--Embedded commas - Field must be delimited with double-quotes.
--Embedded double-quotes - Embedded double-quote characters must be doubled, and the field must be delimited with double-quotes.
--Embedded line-breaks - Fields must be surounded by double-quotes.
--Always Delimiting - Fields may always be delimited with double quotes, the delimiters will be parsed and discarded by the reading applications.
 12-Sep-2007 16:48
User is offline View Users Profile Print this message


Pete Kowalski

Posts: 301
Joined: 7-Feb-2003

Attach is a short script I developed. For any object in the display set, it will read all the incoming links and capture the source module(s) associated with these links.

Currently, I have an issue displaying the data correctly in Excel. If an object has one source module associated with it then everything is hunky dory. However, the issue comes if there are more then one source module. I have illustrated this in the attached picture.

Any clues on how to resolve this?

problem.png
problem.png  (187 KB)



-------------------------
pete.kowalski(at)motorola.com
Report this to a Moderator Report this to a Moderator
 12-Sep-2007 17:18
User is offline View Users Profile Print this message


Kevin Murphy

Posts: 206
Joined: 15-Jul-2005

Peter,

I tried running your code in DOORS 8.2 and it didn't give me any source modules, even though I filtered to only show objects with in-links.

Further, are you cutting and pasting into Excel? I have a feeling you are. What happens if you try to write a csv file? And why not use layout DXL for this?

-------------------------
Kevin Murphy
http://www.baselinesinc.com
The Requirements Management Experts
Report this to a Moderator Report this to a Moderator
 12-Sep-2007 17:23
User is offline View Users Profile Print this message


Pete Kowalski

Posts: 301
Joined: 7-Feb-2003

Kevin:

Thanks for a reply.

I am currently using DOORS 7.1. I'm unsure why my code didn't work with DOORS 8.2 though.

I'm not cutting and pasting the file into Excel. I am copying and pasting the information from the DXL Window to a text file and then opening the file with Excel. In Excel, I am delimiting the file with the comma delimiter. I will write the data directly to a CSV file to see if it makes a difference.

The reason why layout dxl isn't be used here is that I need to do my analysis outside of DOORS in this case. With the script I'm running it is touching a lot of modules, and using layout dxl will be cubersome ( performance wise ) in this case.

-------------------------
pete.kowalski(at)motorola.com
Report this to a Moderator Report this to a Moderator
 12-Sep-2007 17:27
User is offline View Users Profile Print this message


Sudip Das

Posts: 14
Joined: 2-May-2007

Pete,
Do you use excel's import functions?  Are you selecting commas as the delimiter?  You could use something other than commas to separate the values of foo so the values would be in one cell.  Chr(10) is the character that is equivalent to the alt-enter in excel, but I'm not sure how you would refer to it in DXL. 
Report this to a Moderator Report this to a Moderator
 12-Sep-2007 17:52
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

Answer Answer
Your problem is due to not following the specification for what consititues a comma delimited file.

You are using a stripped down version of what a csv file is.

If you look up the standard you will find that:

--Each record is one line - Line separator may be LF (0x0A) or CRLF (0x0D0A), a line seperator may also be embedded in the data (making a record more than one line but still acceptable).
--Fields are separated with commas.
--Leading and trailing whitespace is ignored - Unless the field is delimited with double-quotes in that case the whitespace is preserved.
--Embedded commas - Field must be delimited with double-quotes.
--Embedded double-quotes - Embedded double-quote characters must be doubled, and the field must be delimited with double-quotes.
--Embedded line-breaks - Fields must be surounded by double-quotes.
--Always Delimiting - Fields may always be delimited with double quotes, the delimiters will be parsed and discarded by the reading applications.

Edited: 12-Sep-2007 at 20:33 by ron lewis
Report this to a Moderator Report this to a Moderator
 17-Sep-2007 15:48
User is offline View Users Profile Print this message


Pete Kowalski

Posts: 301
Joined: 7-Feb-2003

Thanks Ron. I wasn't aware that there was a CSV standard so thank for opening up my eyes.

For those who are curious the way I resolved my problem in this case, was I created another object attribute. In that attribute, I wrote all the source module(s) (i.e. foo variable) into the attribute and then did a simple DOORS export to a CSV. The reason for this method is that I was underneath a time crunch.

-------------------------
pete.kowalski(at)motorola.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.