6 Replies Latest reply: May 15, 2014 10:03 AM by Grant Perkins RSS

    Exporting .txt file without heading

    Dave-G _

      I have a .txt file as input and I want to export the file back out as a .txt without the column heading row. I need to show just the actual data. I suspect that scripting will come into play. What might I need to do?

        • Exporting .txt file without heading
          Grant Perkins

          I have a .txt file as input and I want to export the file back out as a .txt without the column heading row. I need to show just the actual data. I suspect that scripting will come into play. What might I need to do?[/quote]

           

          Any other changes apart from dropping the heading row?

           

           

          Grant

            • Exporting .txt file without heading
              Dave-G _

              No other changes. Just eliminating the heading row.

                • Exporting .txt file without heading
                  Grant Perkins

                  As you have posted this in the Data Pump forum I am anticipating that this is part of a wider process and I may be missing something in my thinking here but there are two options I can think of within Monarch functionality depending on how you have approached any other use of the data in the report.

                   

                  1. If you have a table with fields (but otherwise pretty much laid out as the original file) you might suffice by exporting it with the Options>Exports and Clipboard options..  >  General Tab ... Field Names box:Include Fields Names as Output .... untagged.

                   

                  2. Plan B would be to define a model that has a single wide field and no trap character so you get a table one column wide that looks like the original report. Use a Fixed Font to retain formatting.

                   

                  Add a calculated field for RECNO() and hide it. Filter in the Recno field so that the unrequired line is not selected (maybe something like RECNO_FIELD>1  ).

                   

                  Export what is left.

                   

                   

                  If the heading repeats as a page header you may need to look at a variation on that concept involving perhaps Page() and Line() for filtering.

                   

                   

                  Alternatively you may well be able to use an editor to chop off just the first row. This could probably be automated with a batch script

                   

                   

                  HTH.

                   

                   

                  Grant

                    • Exporting .txt file without heading
                      Dave-G _

                      Additional background, the report file has only 4 lines of data without any headings. The heading I am trying to eliminate comes from the "table" view.

                      For method 2, I believe you were thinking that the report had a heading and was being included with the data. I can see where the RecNo() would work, if the report headings and data were included together.

                      I was successful with method 1. By "untagging" the box for heading rows under "Options". Will this affect only this model or all models that have been built?

                      If this affects all models, then we may be onto your last suggestion about a batch script.

                      What would the batch script look like? I have minimal scripting knowledge.

                       

                      Thank you for your prompt respones.

                        • Exporting .txt file without heading
                          joey

                          Option 1 of Grant's is model specific.  It will not change any other models.

                            • Exporting .txt file without heading
                              Grant Perkins

                              Option 1 of Grant's is model specific. It will not change any other models.[/quote]

                               

                              You got there befor me Joey! 

                               

                              I would add that if you normally DO want to export the header rows then don't forget to change the Option back on when you have saved this  model and so ensure the default is set to make the export of the header row.

                               

                              On the other hand if you would prefer the default to be no export, just leave the options turned off.

                               

                              Once saved each model will retain whatever the setting was when it was last saved.

                               

                              Glad you have a solution.

                               

                              Grant