Hello Together, I need a help on how to automate the DOORS data export option specific for every module. Configuring once, the user should be able to export data from DOORS to an Excel file on a single click. 1.Here the user may configure the attributes to be exported based on the need. 2.The field "Object Identifier" should be changed to "ID" Is there any way to customize this feature inside DOORS? Or do we need to export whole data from DOORS and process it separately? Can anyone pls help me how to achieve the same. Thanks.
Adminani - Tue Nov 18 05:23:08 EST 2014 |
Re: Automate DOORS export functionality Thank you Estebell. But I am not much aware of DXL scripting. Can yu pls share some links or code for this option |
Re: Automate DOORS export functionality Make a view and name it whatever you like. For the object identifier column change the title to 'ID' and save the view. Run this dxl from the DOORS explorer window(go to Tools>Edit DXL) and it will load the specified view and export every module you selected in the current folder to excel. It will open an excel window for each module so each needs to be saved separately.
//post by Jim(iron-man?) https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014305335#77777777-0000-0000-0000-000014587301
Skip selectedItems = getSelectedItems ()
Item I = null
for I in selectedItems do
{
if(isDeleted(I) || null I) {continue}
if (type (I) == "Formal")
{
Module m = read(fullName(I),true)
load view "ExcelExport"
//delete column 0//dont know why this was here to delete the first column after loading the view.
{
// override some default message box functions, so they will only print the data but
// not pause execution. Write to a log file here!
bool confirm (string s) { print "Confirmed: " s "\n"; return true }
void ack (string s) {print "Acknowledge: " s "\n" }
void acknowledge (string s) {print "Acknowledge: " s "\n" }
void infobox (string s) {print "Info: " s "\n" }
void info (string s) {print "Info: " s "\n" }
DB theDiag = null
// Now override block and show, to only do realize
void show (DB x) { realize x; theDiag = x }
void block (DB x) { realize x; theDiag = x }
if (null current Module) {
print "You need to have a current Module set for the export."
halt
}
// we need braces, since -D will be executed at top level and we will get name
// clashes for variable defined in word.dxl and the other includes of it.
{
// now include the word.dxl -> this will pop up the dialog, but not halt execution
// due to the overrides above
#include <standard/export/office/excel.dxl> //for the standard excel exporter
// here we can change the dialog options. See itfui2.inc and word.dxl for all
// the options
// set(exportHeadingsToggle, false) // turn off export of headings
//set(exportWarnUnregOLE,false) //turn off ole warning
// now manually launch the export button callback
doExcel theDiag //for the standard excel exporter
// get rid of the dialog
if (!null theDiag) destroy theDiag
// close DOORS
//exit_
}
}
close(m)
}
}
delete selectedItems
|
Re: Automate DOORS export functionality bmohamed - Fri Nov 28 12:05:31 EST 2014 Make a view and name it whatever you like. For the object identifier column change the title to 'ID' and save the view. Run this dxl from the DOORS explorer window(go to Tools>Edit DXL) and it will load the specified view and export every module you selected in the current folder to excel. It will open an excel window for each module so each needs to be saved separately.
//post by Jim(iron-man?) https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014305335#77777777-0000-0000-0000-000014587301
Skip selectedItems = getSelectedItems ()
Item I = null
for I in selectedItems do
{
if(isDeleted(I) || null I) {continue}
if (type (I) == "Formal")
{
Module m = read(fullName(I),true)
load view "ExcelExport"
//delete column 0//dont know why this was here to delete the first column after loading the view.
{
// override some default message box functions, so they will only print the data but
// not pause execution. Write to a log file here!
bool confirm (string s) { print "Confirmed: " s "\n"; return true }
void ack (string s) {print "Acknowledge: " s "\n" }
void acknowledge (string s) {print "Acknowledge: " s "\n" }
void infobox (string s) {print "Info: " s "\n" }
void info (string s) {print "Info: " s "\n" }
DB theDiag = null
// Now override block and show, to only do realize
void show (DB x) { realize x; theDiag = x }
void block (DB x) { realize x; theDiag = x }
if (null current Module) {
print "You need to have a current Module set for the export."
halt
}
// we need braces, since -D will be executed at top level and we will get name
// clashes for variable defined in word.dxl and the other includes of it.
{
// now include the word.dxl -> this will pop up the dialog, but not halt execution
// due to the overrides above
#include <standard/export/office/excel.dxl> //for the standard excel exporter
// here we can change the dialog options. See itfui2.inc and word.dxl for all
// the options
// set(exportHeadingsToggle, false) // turn off export of headings
//set(exportWarnUnregOLE,false) //turn off ole warning
// now manually launch the export button callback
doExcel theDiag //for the standard excel exporter
// get rid of the dialog
if (!null theDiag) destroy theDiag
// close DOORS
//exit_
}
}
close(m)
}
}
delete selectedItems
Hi Mohamed, I copied and pasted the dxl code that you gave, when I click run, nothing happen. Kindly explain to me. My DOORS 9.6.0.1 |
Re: Automate DOORS export functionality goneboy - Thu Nov 19 05:46:37 EST 2015 Hi Mohamed, I copied and pasted the dxl code that you gave, when I click run, nothing happen. Kindly explain to me. My DOORS 9.6.0.1 Did you set line12 and line40? they are for the name of the view you want to export in the selected modules and the path to the excel exporter thats built into DOORS. Did you select select a module(s) to export? load view "ExcelExport" #include <standard/export/office/excel.dxl> |
Re: Automate DOORS export functionality bmohamed - Thu Nov 19 13:28:59 EST 2015 Did you set line12 and line40? they are for the name of the view you want to export in the selected modules and the path to the excel exporter thats built into DOORS. Did you select select a module(s) to export? load view "ExcelExport" #include <standard/export/office/excel.dxl> Hi Mohamed, I haven't still undertood yet. Example: I have a DOORS link: https://...00023122?doors.vie009", this is current link, e.g 40.4, now I want to retrieve the baseline (e.g 40.1), how must I do.
|
Re: Automate DOORS export functionality goneboy - Fri Nov 20 01:24:09 EST 2015 Hi Mohamed, I haven't still undertood yet. Example: I have a DOORS link: https://...00023122?doors.vie009", this is current link, e.g 40.4, now I want to retrieve the baseline (e.g 40.1), how must I do.
I dont know how to pull different baselines. what my code does is let you select several modules at once, then export a certain view to excel without having to open each module and export one by one. |
Re: Automate DOORS export functionality bmohamed - Fri Nov 20 02:18:54 EST 2015 I dont know how to pull different baselines. what my code does is let you select several modules at once, then export a certain view to excel without having to open each module and export one by one. I know, Kindly explain to me what I have to do with load view "ExcelExport" and #include <standard/export/office/excel.dxl>
|
Re: Automate DOORS export functionality goneboy - Fri Nov 20 02:58:06 EST 2015 I know, Kindly explain to me what I have to do with load view "ExcelExport" and #include <standard/export/office/excel.dxl>
#include... is the location and file of the doors excel exporter. if you export modules using the export to excel function built in doors then leave that line as is. my modules all have a view named 'ExcelExport' so that line tells the dxl which view to load and export. rename your views to 'ExcelExport' or change that line in the dxl above to the view name you use in your doors modules. |
Re: Automate DOORS export functionality bmohamed - Fri Nov 28 12:05:31 EST 2014 Make a view and name it whatever you like. For the object identifier column change the title to 'ID' and save the view. Run this dxl from the DOORS explorer window(go to Tools>Edit DXL) and it will load the specified view and export every module you selected in the current folder to excel. It will open an excel window for each module so each needs to be saved separately.
//post by Jim(iron-man?) https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014305335#77777777-0000-0000-0000-000014587301
Skip selectedItems = getSelectedItems ()
Item I = null
for I in selectedItems do
{
if(isDeleted(I) || null I) {continue}
if (type (I) == "Formal")
{
Module m = read(fullName(I),true)
load view "ExcelExport"
//delete column 0//dont know why this was here to delete the first column after loading the view.
{
// override some default message box functions, so they will only print the data but
// not pause execution. Write to a log file here!
bool confirm (string s) { print "Confirmed: " s "\n"; return true }
void ack (string s) {print "Acknowledge: " s "\n" }
void acknowledge (string s) {print "Acknowledge: " s "\n" }
void infobox (string s) {print "Info: " s "\n" }
void info (string s) {print "Info: " s "\n" }
DB theDiag = null
// Now override block and show, to only do realize
void show (DB x) { realize x; theDiag = x }
void block (DB x) { realize x; theDiag = x }
if (null current Module) {
print "You need to have a current Module set for the export."
halt
}
// we need braces, since -D will be executed at top level and we will get name
// clashes for variable defined in word.dxl and the other includes of it.
{
// now include the word.dxl -> this will pop up the dialog, but not halt execution
// due to the overrides above
#include <standard/export/office/excel.dxl> //for the standard excel exporter
// here we can change the dialog options. See itfui2.inc and word.dxl for all
// the options
// set(exportHeadingsToggle, false) // turn off export of headings
//set(exportWarnUnregOLE,false) //turn off ole warning
// now manually launch the export button callback
doExcel theDiag //for the standard excel exporter
// get rid of the dialog
if (!null theDiag) destroy theDiag
// close DOORS
//exit_
}
}
close(m)
}
}
delete selectedItems
Hi! I am so happy I found this forum. This was exactly what I have been looking for. BUT when I run it, the export does it with Ignoring the Main column. How do I get it to run it with "Object Heading and Test" choice as a default. Thanks!!!! |
Re: Automate DOORS export functionality KarinaMoon - Thu May 19 10:09:29 EDT 2016 Hi! I am so happy I found this forum. This was exactly what I have been looking for. BUT when I run it, the export does it with Ignoring the Main column. How do I get it to run it with "Object Heading and Test" choice as a default. Thanks!!!! Find the excel export dxl here standard/export/office/excel.dxl and look for the line for the dropdown and set it to the choice that corresponds to 'object heading and text' as default choice. Its at line 555 in my file. mainChoice = choice(excelBox,LS_("String__Main_column",NLSTEMP_("'Main' column:")),mainChoices,mainHeadingLong, 30, false)//changed this to mainHeadingLong as default option when dropdown loads |