Skip to main content

Copy Header Info

Background

The script will copy the header info from one file to another file.  This can be used when importing an excel file in which the data is over several tabs but the header info is only on the first tab.  The script will take the header info from the first and copy it to the second file.

The script was updated on March 17, 2016.  It now has an option to copy the old header name to the field description so that information is not lost.

Documentation

This script can be used when you have files that have the same file structure but for whatever reason the header information is not the same between the files.  The most likely time this would happen is when you are importing an excel spreadsheet and the data has been spread over multiple tabs but only the 1st tab as the header information.

The following is an example of an SAP BSEG file that was brough in through excel.  The first tab has the header info.

Header 1

The second tab contains the same data format but without the header info.

Header 2

The script will take the header information from File 1 and replace the header information in File 2.  In order for the script to work the file must have the same number of fields.

When you run the script you will be asked to select the file with the header info and the file you wish to copy the header info to.

Header Dialog

Once you click ok you will have the following changes in File 2.

Header 5

As you can see File 2 now has the same field names (header info) as file 1.

Language
IDEAScript

aliasgar.sk Wed, 09/18/2019 - 02:40

Hi Brian, great work with the script!
Can this script be upgraded to change header info of multiple files at the same time ? this would save alot of time in case a user is appending multiple files at the same time and requires the header info to be uniform for all the files.
I appended close to 130 files yesterday, the Copy header info script was useful but I still ended up spending quite sometime as there was so many files which required to change the header info.