2 Replies Latest reply: May 15, 2014 10:04 AM by Grant Perkins RSS

    Incorrect output in spreadsheet

    dietze63 _

      Dear All,

       

      Problem as followed:

       

      I must analyze some couple of txt-files, which have two different format (different number of lines):

       

      Type 1)

       

      Umschreibung              Identnr     Platzhalter  Sachmerkmalleiste

      ====================================================================

      MAT_NR_RWR_PROFIL_UNTEN   1032419                  sm3916un

      MAT_NR_RWR_PROFIL_RECHTS  1075366     002982       sm3916re

      MAT_NR_RWR_PROFIL_LINKS   1075365     002981       sm3916li

      MAT_NR_RWR_PROFIL_OBEN    1032219                  sm3916ob

      MAT_NR_RWR_KPL            0                        sm3916rwra

      MAT_NR_RWT_LINKS          1069300                  sm3916rwt_li

      MAT_NR_RWT_RECHTS         1069296                  sm3916rwt_re

       

       

      Type 2)

       

      Umschreibung              Identnr     Platzhalter  Sachmerkmalleiste

      ====================================================================

      MAT_NR_RWR_PROFIL_UNTEN   1032419                  sm3916un

      MAT_NR_RWR_PROFIL_RECHTS  1028169                  sm3916re

      MAT_NR_RWR_PROFIL_LINKS   1028168                  sm3916li

      MAT_NR_RWR_PROFIL_OBEN    1075363     002976       sm3916ob

      MAT_NR_RWR_KPL            0                        sm3916rwra

      MAT_NR_RWT_LINKS          1069383                  sm3916rwt_li

      MAT_NR_RWT_RECHTS         1069352                  sm3916rwt_re

      MAT_NR_RWT_BL_LINKS       0                        sm

      MAT_NR_RWT_BL_RECHTS      0                        sm

      MAT_NR_RWT_VERR_LINKS     0                        sm

      MAT_NR_RWT_VERR_RECHTS    0                        sm

      MAT_NR_RWT_DICHT_LINKS    0                        sm

      MAT_NR_RWT_DICHT_RECHTS   0                        sm

       

       

      My suggestion is to summary the files to one file. Than to define detail-pattern for each line. The selektor would be the content from each first cell of the line.

      The report-window show the right marks. But if I do a export to Excel, some cell contains wrong data !?!?

       

      Regards dietze63

        • Incorrect output in spreadsheet
          Olly Bond

          Hallo Dietze and welcome to the forum,

           

          If you could post an example of the output that you are looking for, it would be very helpful.

           

          If you want get one row of data in Excel for each row of data in your text file, then use a simple "non-blank" trap in column one, and then define a field for the whole row and use lsplit(x;4;" ";1), lsplit(x;4;" ";2) to define the fields. You could also use the floating trap with the blank trap as the field boundary.

           

          If you want some more complex summary, filtering or comparison of the data, please let us know!

           

          mfG,

           

          Olly

          • Incorrect output in spreadsheet
            Grant Perkins

            Hello dietze63 and welcome to the forum.

             

            I have read the dscription of your problem but I am not sure if you are using your template to make every line a detail record or have a multiple line data sample to make several lines combine into one record.

             

            If you see the concatentated report as a series of multiple line records then you will need to make your sample lines for the template to be only as many lines as you see in your smallest record. If every record ends with a blank line or more than one blank line or some other constant but not data related characters you could include those lines in the sample as well.

             

            For records that are bigger than the minimum number of lines you will need another template to extract the data. This is likely to be an APPEND template but may be a footer template. You may need several templates in some situations.

             

            I think what you may be seeing in the Excel ouput is some sort of overlap of the templates where, perhaps, one template is longer than the number of lines for a specific records and so will also overlap the start of the next record. In this case Monarch will not 'see' the next record when extracting but the report screen would still highlight the fields defined in the template since it is not running a full extraction process example when indicating what your template definition is likely to do.

             

            There are similar situations that can occur if you are using Append or footer templates.

             

            If you are using single detail lines for the template sample then you have a different problem to the one I have written about above.

             

             

            Does this help at all?

             

             

            Grant