Support 805.461.7300
Sales
Our Technology. Your Success.
Tech Notes

Export presort using original CSV's field names

We have created a simple-to-use Utility Program that will use the “Original Header” record from your CSV Input File, then add the additional fields added by AccuZIP6, including any presort fields, to a new CSV in Presort order.

Please download writeoutputcsv.zip and unzip to C:\Program Files (x86)\AccuZIP6 5.0\WriteOutputCsv.fxp

Follow the simple steps below to create a new CSV with your original field names and additional fields in Presort Order:
  • Open AccuZIP6 5.0.
  • Use the File|Open List to open your original Input File.
  • Validate and Presort the list.
  • Once the file is presorted, click “Print Labels” from the Print Presort window. This generates the Presort.prt
  • Close the Print Presort window
  • From the Edit menu, choose Command…
  • Click New and give the command a name, e.g., Write New CSV with Original Field Names
  • Press TAB and type the following syntax in the large box:
=WriteOutputCsv()

  • Click Run
  • Prompt #1 – Locate Original Input CSV with long field names in the header. Note: This is the file you opened with Open List
  • Prompt #2 – Locate Presort.prt inside the last Presort Folder. The Presort folder and Presort.prt file were created during the presort
  • Prompt #3 – Give the new CSV a Name. Note: This is the resulting CSV file that will contain the long file names[/color]


You can also use the Utility Program with parameters to suppress the prompts:

=WriteOutputCsv("c:\demofile.csv","c:\presort folder\presort.prt","c:\demofile clean.csv")

You can also leave a parameter blank so you are prompted. Say you want to be prompted for the Presort.prt (second parameter):

=WriteOutputCsv("c:\demofile.csv","","c:\demofile clean.csv")

The beauty is that you can use the same Input file all the time. If you have an input file that matches the Headers you always use, then point to it each time in the first parameter. If you want to always save the final result to the same location, then enter the path where you always want it saved.

You can also have the software always use the Current Databases name with a Date Stamp saved to the same folder, like this:

=WriteOutputCsv("c:\demofile.csv"," c:\presort folder\presort.prt ",FORCEEXT(DBF(),"")+ALLTRIM(STR(YEAR(DATE())))+PADL(ALLT

« Back to Tech Notes

I can't believe how excellent your support is. The last disaster you rescued me from was one that a programmer had told me had no answer that he knew of. Well, you know more than him! I e mail ed you on a SATURDAY and you had the problem solved by Monday morning!
C.P., Houston, TX