Extract cost model information for use in Excel or Access

Dear Community,

after successfully creating 385 cost models, we have now been asked if there is anyway to extract these data for use in Excel or Access. I know I can export the cost models as .tml files, which someone with far more XML and Excel skill than I MIGHT be able to do something with. What about exporting a portion of the database with these data so they can be viewed in Access?

As always, thanks in advance!

Parents
  • Dave,

    I used the TML file and converted all the cost entries by target locale into a single row of comma separated values

    The TML has a block of data loke the following for each language:

    <costModelLocale>
            <localeRef>Arabic (Saudi Arabia)</localeRef>
            <ice>0.0</ice>
            <perfect>0.0</perfect>
            <repetition>0.04</repetition>
            <rangeWordPrices>
              <price>0.225</price>
              <price>0.135</price>
              <price>0.09</price>
              <price>0.09</price>
            </rangeWordPrices>
          </costModelLocale>

    Using notepad ++ and a series of regular expression replacements to create the following result:

    Arabic (Saudi Arabia),0.0,0.0,0.04,0.225,0.135,0.09,0.09

    The set of replacement operations using the regular expression find and replace in notepad++ are:

    \r\s*<price> <-- <price>
    \r\s* <--
    \r\s*<repetition> <-- <repetition>
    \r\s*<perfect> <-- <perfect>
    \r\s*<ice> <-- <ice>
    </[^>]*?> <-- no value to remove such entries
    delete       <costModelLocale>
    \s*<localeRef>  <-- no value to remove such entries
     <-- no value to remove such entries

    <[^>]*?> <-- ,

  • The line  <-- no value to remove such entries should be <rangeWordPrices> <-- no value to remove such entries

Reply Children