This content has been marked as final. Show 4 replies
I just took your second script and corrected a line. Check and let me know.
Set vConcatenate = ; sub ScanFolder(Root) for each FileExtension in 'xls' for each FoundFile in filelist( Root & '\*.' & FileExtension) FileList: $(vConcatenate) LOAD @1, @2 from [$(FoundFile)] (biff, no labels, table is [Sheet1$]; Set vConcatenate = Concatenate; next FoundFile next FileExtension for each SubDirectory in dirlist( Root & '\*' ) call ScanFolder(SubDirectory) next SubDirectory end sub Call ScanFolder('C:\Users\Mindaugasb\Desktop\Orders\2016') ;
I tried the first one as well but modified like below.
SUB DoDir(Root) FOR each File in filelist( Root & '\*.xls') LOAD @1, @2 FROM [$(File)] (biff, no labels, table is Sheet1$); NEXT File FOR each Dir in Dirlist (Root&'\*') CALL DoDir(Dir) NEXT Dir END SUB CALL DoDir('C:\Users\Mindaugasb\Desktop\Orders\2016')