Topic
  • 6 replies
  • Latest Post - ‏2014-08-04T07:32:01Z by Mathias Mamsch
KBSri
KBSri
104 Posts

Pinned topic Reading an XML file and exporting it to EXCEL

‏2014-05-05T14:42:57Z |

Hello ,

I have to read an XML file and convert that into EXCEL data after looping through the DOORS modules from the XML.

Any help is appreciated.

Thanks.

  • BillTidy
    BillTidy
    30 Posts

    Re: Reading an XML file and exporting it to EXCEL

    ‏2014-05-06T14:09:33Z  

    Don't understand what you are trying to achieve. Why go via DOORS when Excel can import XML directly?

  • Mathias Mamsch
    Mathias Mamsch
    2153 Posts

    Re: Reading an XML file and exporting it to EXCEL

    ‏2014-05-07T06:40:40Z  

    You need to ask more specific questions. Just stating something like "I need to make program XY, any help will be appreciated" is not making clear what exactly your problem is. It also suggests, that you did not take any time to research on your own problem.

    There are a couple of posts dealing with reading XML in this forum. Did you already use the search function?

    Regards, Mathias

  • Mathias Mamsch
    Mathias Mamsch
    2153 Posts

    Re: Reading an XML file and exporting it to EXCEL

    ‏2014-05-19T11:30:23Z  
    This reply was deleted by KBSri 2014-07-02T15:07:27Z.

    Hmm ... So when you start from that very generic Word export script. Then you might have not a lot of choices. It seems the file you have sent, is simply a modified version of the Word standard export from DOORS... So from the structure the call tree seems to be like:

     

    Main -> initGUI (will show dialog ) -> Export -> GetFilterFromXML -> HandleSection -> ProcessTranspose -> ...
                                                                      -> UpdateTOC 
    

    where ProcessTranspose already does some kind of Excel Export? Without trying it is hard to tell what the script is supposed to do, but it already seems to contain some kind of Excel Export from the XML which should give you a good start.

    The old Word Export Functions like "wordDoExportVBA" are not even called anymore ... So in your case I would go in and start removing dead code from the file, until you really only have what is used. Then I would go in and analalze the remaining code and give a few more speaking function names, so it is easier to understand what is going on.

    Then I would replace the parts that do export stuff to Word by functions that export instead to Excel ...

    Maybe that helps, Regards, Mathias

     

     

  • KBSri
    KBSri
    104 Posts

    Re: Reading an XML file and exporting it to EXCEL

    ‏2014-07-26T13:20:29Z  

    Hmm ... So when you start from that very generic Word export script. Then you might have not a lot of choices. It seems the file you have sent, is simply a modified version of the Word standard export from DOORS... So from the structure the call tree seems to be like:

     

    <pre dir="ltr">Main -> initGUI (will show dialog ) -> Export -> GetFilterFromXML -> HandleSection -> ProcessTranspose -> ... -> UpdateTOC </pre>

    where ProcessTranspose already does some kind of Excel Export? Without trying it is hard to tell what the script is supposed to do, but it already seems to contain some kind of Excel Export from the XML which should give you a good start.

    The old Word Export Functions like "wordDoExportVBA" are not even called anymore ... So in your case I would go in and start removing dead code from the file, until you really only have what is used. Then I would go in and analalze the remaining code and give a few more speaking function names, so it is easier to understand what is going on.

    Then I would replace the parts that do export stuff to Word by functions that export instead to Excel ...

    Maybe that helps, Regards, Mathias

     

     

    Hello Mat,

    I need to import an XML file to EXCEL via DOORS. The XML should be valid for a current module and based on the Filters mentioned in the XML DOORS objects should be filtered and export the count onto the EXCEL.

    Is that possible? Please help me in starting.

    Updated on 2014-07-26T13:23:39Z at 2014-07-26T13:23:39Z by KBSri
  • KBSri
    KBSri
    104 Posts

    Re: Reading an XML file and exporting it to EXCEL

    ‏2014-08-02T12:37:54Z  
    • KBSri
    • ‏2014-07-26T13:20:29Z

    Hello Mat,

    I need to import an XML file to EXCEL via DOORS. The XML should be valid for a current module and based on the Filters mentioned in the XML DOORS objects should be filtered and export the count onto the EXCEL.

    Is that possible? Please help me in starting.

    Is there any pre-defined XML reading script from DOORS???

    Can anyone please help me out???

  • Mathias Mamsch
    Mathias Mamsch
    2153 Posts

    Re: Reading an XML file and exporting it to EXCEL

    ‏2014-08-04T07:32:01Z  
    • KBSri
    • ‏2014-08-02T12:37:54Z

    Is there any pre-defined XML reading script from DOORS???

    Can anyone please help me out???

    You need to start asking the right questions. The answer to your questions is always: YES

    - YES it is possible to make a script like you describe
    - YES somebody probably has an production script for reading an XML files to DOORS
    - YES probably someone can help you out.

    Anyway, we expect you to have done some research on your own and come here with a specific problem. Just searching for "read xml" I get a couple of posts on the forum mentioning two things:

    1. The DOORS internal perms to read an XML file

    2. The old DXL Standard Library that already contains an XML library wrapping the Windows XML Com API ...

    So I would at least expect that you say "I looked at the perms, but I could not make sense out of X and Y" or "I looked at the library but I was not able to get it to run...", etc.

    Regards, Mathias