Hi all,
I am importing from excel sheets. The column names are always the same, but their order changes. When creating an import template, I can successfully import the sheets using the "By Name" option as opposed to "Position" for the columns in the spreadsheet. The Columns in the spread sheet are named exactly the same as the headers in the sheets. How can I get the import template to always check to make sure it is importing by name?
Thanks!
I must be missing something... there is a checkbox in the Import Wizard (which you also mention) that allows it to pick up any column names you have included in the file, whether spreadsheet, or some other file type, per below. Is this not working for you?
Thank you for your reply Gary.
Actually what I am looking for is two more pages ahead. At the bottom of the Select Target page, there is the MAP option. There is "By Position" and "By Name". On this page it shows me the Source and Target columns. What I want to know is that if I save this template and map on this page "By Name" will it do a new name mapping on the next import with new data. My concern is that the Position of the columns will change. That's why I would like it to always match on name on each import.
Ah, appreciate the clarity... so, I was going to say there should be no problem here, but I was curious and did a few tests in my own environment.
Bottom line is that the Import Template file does not appear to do a dynamic mapping by name every time you re-use the import. So, even though the column headers of your import data file may be spelled exactly the same from automation run to run, the automation script will fail if the columns are in a different order from the original import.
I encourage you to create a post on the Idea Pond for TDP here in ToadWorld to add this idea of dynamic name mapping, or alternatively, I can put in an enhancement request on your behalf.