Adding to CSV file

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Adding to CSV file

    So when I export my data to a CSV file
    Is there a way to export the data and add it to the next line in the CSV file?
    Heres how I export my csv file.
    Code:
                ASSIGN/FILENAME_CSV="P:/Quality/CMM/CMM_PC_SOURCE/WAI/PC-DMIS/2010 MR2/REPORTS/" +SERNUM+ ".CSV"
                ASSIGN/FILENAME_PDF="P:/Quality/CMM/CMM_PC_SOURCE/WAI/PC-DMIS/2010 MR2/REPORTS/" +SERNUM+ ".PDF"
    FPTR       =FILE/OPEN,FILENAME_CSV,WRITE
                FILE/WRITELINE,FPTR,"S/N" +","+ SERNUM
                FILE/WRITELINE,FPTR,"Over all Length" +","+ LOC39.T.MEAS
                FILE/WRITELINE,FPTR,"LENGTH_TE" +","+ LOCP6_TE.T.MEAS
                FILE/WRITELINE,FPTR,"LENGTH_ROOT SLOT" +","+ LOC73.T.MEAS
                FILE/WRITELINE,FPTR,""
                FILE/WRITELINE,FPTR,"leading edge root leg 1" +","+ LOC1.T.MEAS
                FILE/WRITELINE,FPTR,"CC Rt Leg 2" +","+ LOC2.T.MEAS
                FILE/WRITELINE,FPTR,"CC Rt Leg 3" +","+ LOC3.T.MEAS
                FILE/WRITELINE,FPTR,"CC Rt Leg 4" +","+ LOC4.T.MEAS
                FILE/WRITELINE,FPTR,"CC Rt Leg 5" +","+ LOC5.T.MEAS
    Success is to be measured not so much by the position that one has reached in life as by the obstacles which he has overcome.

    Booker T. Washington

  • #2
    On the FILE/OPEN line, change WRITE to APPEND

    Comment


    • #3
      I tried that and all it did was export a filename with my serial number and nothing else.
      Success is to be measured not so much by the position that one has reached in life as by the obstacles which he has overcome.

      Booker T. Washington

      Comment


      • #4
        Also try adding a space before and after each operand (+)

        So instead of say ..." +SERNUM+ ".CSV" you would have ..." + SERNUM + ".CSV"

        I know sometimes Dmis gets funny about operands and (lack of) spacing.

        See if that helps.

        Comment


        • #5
          I think you need to CLOSE the file too

          Comment


          • #6
            Yea it closes, this was just an example of the code, it is over 150 points long, way to much code to post. Ill try the spaces, I have had that issue before
            Success is to be measured not so much by the position that one has reached in life as by the obstacles which he has overcome.

            Booker T. Washington

            Comment


            • #7
              Lost,

              When you get this working can you post what finally worked for you? Thanks!

              Comment


              • #8
                Ive got some free time today, so ill be messing with the export.
                Success is to be measured not so much by the position that one has reached in life as by the obstacles which he has overcome.

                Booker T. Washington

                Comment

                Related Topics

                Collapse

                Working...
                X