![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Importing csv data Topic Summary: Created On: 1-Mar-2005 10:26 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: you don't have to do a character by character parse -- Most common approach is to use regular expressions -- a sample on how to parse a string with regular expression is in the dxl help file. | |
![]() |
|
Does anyone have a simple example of a csv import function?
|
|
![]() |
|
![]() |
|
Your question is so vague you are leaving everyone guessing what you want.
|
|
![]() |
|
![]() |
|
I am looking for a dxl function to read csv data. I have a csv data file (e.g. x, y, z) and would like to read/import this data so that I have it available in dxl land. I was hoping that there would be a very simple way of doing this, but maybe not.
I hope this is not too vague. If so, please give me some tips on where I should elaborate. |
|
![]() |
|
![]() |
|
Why not use the one shrinkwrapped with doors.
In the Formal Module GUI toolbar go to File->Import Spreadsheet. |
|
![]() |
|
![]() |
|
Because I don't want to import the data into a Doors module. I want to have it available in dxl. For example, the data could be a module name that I could use to open a module.
|
|
![]() |
|
![]() |
|
Here is about as simple as you can get -- you will still have to parse the info out per your favorite method of pasing the data print s |
|
![]() |
|
![]() |
|
You could also take a copy of the standard CSV importer and modify it for your needs. You can browse to the DXL under:
DOORS standard DXL library -> Various utilities for importing data into DOORS --> Import comma or tab-separated spreadsheet and database data |
|
![]() |
|
![]() |
|
Antonio - I was hoping somebody had already modified the standard CSV importer, hence saving me the work of sifting through 19 pages of code.
Ron - That's a little bit too simple! Are you suggesting that the only way to import csv data is to read the file as one long string and then separate that string character by character? I was hoping there would be an easier way of doing it than that. |
|
![]() |
|
![]() |
|
you don't have to do a character by character parse --
Most common approach is to use regular expressions -- a sample on how to parse a string with regular expression is in the dxl help file. |
|
![]() |
|
![]() |
|
Until someone pipes up with a modified version of the standard importer, here's something to get you started.
I can think of loads of problems with it, but gives you the gist of using regular expressions to parse a file. |
|
![]() |
|
![]() |
|
Thanks for that Antonio. That's exactly what I was looking for.
|
|
![]() |
|
![]() |
|
As an extension to this discussion:
I have csv data that has been updated from DOORS data. Do you know a way to use dxl restore the data to DOORS and retain previoius (or new) Object Level?
I guess this will mean some clever "create object after/create object below " commands.
I have looked at the comma.dxl script but failed to totally understand. I'm a systems engineer not software.
Regards
Phil Allen
|
|
![]() |
|
![]() |
|
Reply to phil
Search the forums for 'Spreadsheet Import with Hierarchy', that will give some useful pointers.
|
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Importing csv data
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.