New FileFormat

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ccmancio
    Old Hand
    • May 2005
    • 235

    New FileFormat

    Preciso criar um fileformat parta extensão txm que compare dois arquivos com cada registro contendo diversos valores separados por ponto e virgula.
    tentei com "Comma Separated Values"(tenho dois "fileformats" com este nome) mas não funcionou.

    File1 :
    1;a1;b1;c1
    3;a3;b3;c3
    4;a4;b4;c4

    File2
    1;A1;B1
    2;A2:B2;C2
    4;A4;B4;C4
    5;A5;B5;C5

    Preciso que o resultado seja o seguinte :

    File1 File2
    1;a1;b1;c1 1;A1;B1 Diferente
    2;A2;B2;C2 Só na direita
    3;a3;b3;c3 Só na esquerda
    4;a4;b4;c4 4;A4;B4;C4 Igual
    5;A5;B5;C5 So na esquerda

    Alguma sugestão ?
  • Aaron
    Team Scooter
    • Oct 2007
    • 15941

    #2
    Hello,

    The default file format for the Data Compare should detect this. If you have a custom file format you are using, go to the Tools menu -> File Formats, select the format, and in the Type tab, make sure the Delimiter is "Detect" or ";". The Key column is column 1, correct?
    Aaron P Scooter Software

    Comment

    • ccmancio
      Old Hand
      • May 2005
      • 235

      #3
      Ok, Obrigado, nunca tinha usado o Datatype, somente o Text.
      Somente que a primeira coluna de dados é numérica mas o BC esta tratando como Texto, como fazer com que fique na ordem numerica ?

      Na hora de mover de um lado para outro os registros que não existem, não tem a opção "move", somente "copy", porque ?

      Comment

      • ccmancio
        Old Hand
        • May 2005
        • 235

        #4
        Funcionou a ordem quando eu escolhi que o primeirio registro era o nome das colunas, agora só falta a opção "move"....

        Comment

        • ccmancio
          Old Hand
          • May 2005
          • 235

          #5
          aconteceu uma coisa "interessante" ?!
          Se o arquivo da esquerda é :
          Campo1;Campo2
          55;ABC
          100;XYZ
          e o da direita é :
          Campo1;Campo2
          20;ab
          100;XYZ

          eu mando copiar a 1.linha da direita para a esquerda pois não existe na esquerda e salvo o arquivo da esquerda

          Quando vou examinar este arquivo vem como :
          20;ab
          Campo1;Campo2
          55;ABC
          100;XYZ

          Porque o BC coloca a linha de nomes do campo fora de ordem ?????

          Comment

          • Aaron
            Team Scooter
            • Oct 2007
            • 15941

            #6
            Hello,

            The issue here is that the "left" file has both "," and ";" as delimiters, so it is not detecting either as the delimiter. Instead, it is using whitespace likely " ". You would need to format your data so that the delimiter is detected correctly, otherwise you would end up copying the ";" character and introducing your "Field1" line as data.
            Aaron P Scooter Software

            Comment

            • ccmancio
              Old Hand
              • May 2005
              • 235

              #7
              Não entendi. O único delimitador é ";"
              Neste exemplo só existe um delimitador em cada linha.
              Faça o teste.

              Comment

              • Aaron
                Team Scooter
                • Oct 2007
                • 15941

                #8
                Ah, google translate butchered the example text when I first tried to view it.

                Could you send in a full screen screenshot and attach a pair of sample files in future posting?

                I have reproduced the behavior you are seeing with the untranslated text. I'll open a tracker entry to investigate.
                Aaron P Scooter Software

                Comment

                • ccmancio
                  Old Hand
                  • May 2005
                  • 235

                  #9
                  Arquivos de Exemplo

                  Segue anexo arquivo de exemplo e "snapshots"

                  Comment

                  • Aaron
                    Team Scooter
                    • Oct 2007
                    • 15941

                    #10
                    Thanks. That is the behavior I was seeing as well. I'll attach your screenshots to the tracker entry I already made.
                    Aaron P Scooter Software

                    Comment

                    Working...