![]() |
Telelogic DOORS (steve huntington) | ![]() |
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 |
![]() |
![]()
|
![]() 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. | |||
![]() |
|||
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?
------------------------- pete.kowalski(at)motorola.com |
|||
![]() |
|||
![]() |
|||
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 |
|||
![]() |
|||
![]() |
|||
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 |
|||
![]() |
|||
![]() |
|||
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. |
|||
![]() |
|||
![]() |
|||
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 |
|||
![]() |
|||
![]() |
|||
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 |
|||
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.