Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
i am using this script to concatenate files using loops, but with this loop there are many concatenations taking place and my data model doesn't look good...please help me how to avoid that using auto increment
//concate
FOR Each vfile in FileList('C:\Users\w_318460\Desktop\New folder\*.xlsx')
Concat:
LOAD
* from [$(vfile)]
(ooxml, embedded labels, table is Sheet1);
Concatenate
LOAD
* from [$(vfile)]
(ooxml, embedded labels, table is Sheet1);
NEXT vfile
Thanks
Yogesh
Stefan field names get change in every file...like one will have empno,deptno,sal and other file may contain empno,loc,Dept
after executing ua script i can see table-1 and table-2 in table table viewer.. which i dont want ...i need only one
SET vConcatenate = ;
FOR Each vfile in FileList('C:\Users\w_318460\Desktop\New folder\*.xlsx')
Concat:
$(vConcatenate)
LOAD
*
FROM
[(vfile)] (ooxml, embedded labels, table is Sheet1)
;
SET vConcatenate = Concatenate;
NEXT
Its working fine...thank you so much gysbert and stefan for ua assistance
i am not able to understand what you actually did ...can you tell me what you did and how it works?
Hi,
another method could be:
Concat:
LOAD 0 as TempField
AutoGenerate 0;
FOR Each vfile in FileList('C:\Users\w_318460\Desktop\New folder\*.xlsx')
Concatenate
LOAD * From [$(vfile)] (ooxml, embedded labels, table is Sheet1);
NEXT vfile
DROP Field TempField;
hope this helps
regards
Marco
Its working fine. thank you Macro
If your request is resolved, then please close this thread.