6 Replies Latest reply: May 15, 2014 10:15 AM by elginreigner _ RSS

    Monarch 8.02 not importing last line of data from a .csv

    Alca _

      Hi,

       

      I have recently encountered an issue when pulling a .csv file into Monarch.

       

      The file itself is around 900 lines long. Whats happening is that Monarch is pulling the data in correctly apart from half of the last line. It seems to get cut off half way along.

       

      I have examined the formatting of the data where it gets cut off, and have compared the affected line to other lines, and the formatting is an exact match.

       

      A colleague then added in 3 dummy entries below the chopped line. The 3 dummy entries werent matches of the data above it, it was just something to populate cells A935, A936, A937.

       

      What happened next...the line that had been chopped of suddenly reappeared in Monarch, but the formatting across the file was completely screwed.

       

      A total headscratcher, and a workaround is in place now because I couldnt find a solution, however, I'd like to know whats causing the problem in the event it happens again.

       

      Any ideas?

       

      Alan

        • Monarch 8.02 not importing last line of data from a .csv
          Grant Perkins

          Hello Alan,

           

          Your description would seem to fit with a lack of an end of file character for the input file or something similar. This would be why adding more records makes the rest of the line re-appear.

           

          You could try editing the problem file to add a couple of "returns" ( i.e. new lines with no length) to see if that is enough to fix the problem.

           

          What is the source of the input file? You may find the origin of the problem there.

           

          Is this a one off problem or are you finding it always (or often) happens with this file source?

           

          Once we can identify the cause it should be easy enough to work out a way to resolve it automatically if required.

           

          HTH.

           

           

          Grant

            • Monarch 8.02 not importing last line of data from a .csv
              Alca _

              Hello Alan,

               

              Your description would seem to fit with a lack of an end of file character for the input file or something similar. This would be why adding more records makes the rest of the line re-appear.

               

              You could try editing the problem file to add a couple of "returns" ( i.e. new lines with no length) to see if that is enough to fix the problem.

               

              What is the source of the input file? You may find the origin of the problem there.

               

              Is this a one off problem or are you finding it always (or often) happens with this file source?

               

              Once we can identify the cause it should be easy enough to work out a way to resolve it automatically if required.

               

              HTH.

               

               

              Grant[/QUOTE]

               

              Cheers Grant, Ill have a look again and see if I can make sense of it!

                • Monarch 8.02 not importing last line of data from a .csv
                  Grant Perkins

                  Cheers Grant, Ill have a look again and see if I can make sense of it![/QUOTE]

                   

                  Alan,

                   

                  You'll need to look at it in an editor for which you can turn on display of the print and format control characters.

                   

                  Word will allow that but to actually edit I would go for something simple like notepad (or wordpad for larger files) and make sure that you save without formatting and so on. Just the basic text to be saved. Word will allow that but I have known it to be less than successful from time to time.

                   

                   

                  HTH.

                   

                   

                  Grant

                • Monarch 8.02 not importing last line of data from a .csv
                  elginreigner _

                  Hello Alan,

                   

                  Your description would seem to fit with a lack of an end of file character for the input file or something similar. This would be why adding more records makes the rest of the line re-appear.

                   

                  You could try editing the problem file to add a couple of "returns" ( i.e. new lines with no length) to see if that is enough to fix the problem.

                   

                  What is the source of the input file? You may find the origin of the problem there.

                   

                  Is this a one off problem or are you finding it always (or often) happens with this file source?

                   

                  Once we can identify the cause it should be easy enough to work out a way to resolve it automatically if required.

                   

                  HTH.

                   

                   

                  Grant[/QUOTE]

                   

                  Grant, wouldnt this be a missing CR/LF instead of end of file? In the past, I've noticed this issue and Monarch attempted (did not succeed) in merging the 2 records. Just a thought. Notepad ++ is another great software to visually seeing formatting and control characters.

                    • Monarch 8.02 not importing last line of data from a .csv
                      Grant Perkins

                      Hi Elgin,

                       

                      Yep, usually the two things seem to go together. My "End of File" comment was intended to be fairly generic in terms of where to look as a first pass.

                       

                      I think most modern editors are capable of showing what needs to be seen these days but one had to remember to save in plain text rather than rtf or some other format. Not a problem if it's something one does regularly but easy to forget if it isn't!

                       

                      If the input file is actually a data dump (one line per record) and the lines have wrapped in the editor for display purposes the results can sometimes be a little more confusing to assess if it is something one has not seen before. (Or even if one has!)

                       

                      Grant

                        • Monarch 8.02 not importing last line of data from a .csv
                          elginreigner _

                          Hi Elgin,

                           

                          Yep, usually the two things seem to go together. My "End of File" comment was intended to be fairly generic in terms of where to look as a first pass.

                           

                          I think most modern editors are capable of showing what needs to be seen these days but one had to remember to save in plain text rather than rtf or some other format. Not a problem if it's something one does regularly but easy to forget if it isn't!

                           

                          If the input file is actually a data dump (one line per record) and the lines have wrapped in the editor for display purposes the results can sometimes be a little more confusing to assess if it is something one has not seen before. (Or even if one has!)

                           

                          Grant[/QUOTE]

                           

                          This is understood more thant I would like to. The EOF was always a difficult thing to process correctly when I worked as a programmer.