i just noticed that one of the fields I'm loading, does not have a field name in Excel (embedded header).To add to the above discussion, how can I dinamically give a field name (taken into consideration that all the other fields DO have embedded field names). I could put them in manually, but there are many files that I need to load.Thank you
You can try using a Do..While statement for loading multiple fles from the same directory....
for file_counter =1
while file_counter<n //n is the number of files in your sub directory
Load * from file$(file_counter).xlsx;
Hope that helps.
//do while i<4
You can use wildcards to select from multiple files, similar to ...
@1 as Data1,
@2 as Data2
(txt, codepage is 1252, no labels, delimiter is '|', msq, header is 1 lines);
Regarding the missing field name, if you try to load it as embedded labels you will get an error due to the missing column identifier. If you say all the files are same structure, then load it with "no labels" and skip the first line (the header, shown as "header is 1 lines" above) and alias the fields such as @1 as Data1, @2 as Data2.