Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2013
    Location
    USA
    Posts
    132
    Provided Answers: 2

    Unanswered: Headers when exporting data

    Folks,

    Does any one know how to add header when files get exported?

    Something like follow example:

    NAME, ADDRESS, CITY, STATE, ZIP-CODE
    John,3920 main st, New York, NY, 94839
    Alex, 3928 Lugonia ave, Los Angeles, CA, 90210
    Rick, 2930 Blue River, Phoenix, AZ, 234323

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    The "quick and dirty" solution that I've used with other databases is to
    1. export the file without the headers into a scratch file (c:\scratch.csv)
    2. write only the headers into the desired file (c:\desired.csv)
    3. append the scratch into the desired using:
      Code:
      copy c:\desired.csv + c:\scratch.csv
    4. delete the scratch file (if you're a neat freak like me)
    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  3. #3
    Join Date
    Sep 2011
    Location
    Australia
    Posts
    264
    Provided Answers: 2
    Hi
    Not a problem if you are exporting to CSV (text) files. In the text export editor just enter field names in the "begin part" above record part (data). Quick way if you have a lot of fields is copy and paste the record part in to say notepad and do a replace of "[" and "]". Copy back to begin section all done. You will now have first line with field names in export.
    XML appears to include field names but never used.
    Regards
    David

  4. #4
    Join Date
    Apr 2013
    Location
    USA
    Posts
    132
    Provided Answers: 2
    Thank you guys, let me try both advices.

    I will let you know.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •