Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
paulcalvet
Partner - Specialist
Partner - Specialist

Excelfilename in script editor

Hi,

I want to extract and store the excel file name from many Excel Files wich are in a folder.

DIRECTORY '$(vs_Source_Data)\budget';
FOR EACH ExcelFile in FileList('*2013_09*.xls')
BUDGET:
       
Load
       
KeepChar(left(@2,18),'0123456789') as Compte,
       
@3 as Budget_2013
        $(ExcelFile) as Dossier,
FROM $(ExcelFile)
(
biff, no labels, header is 6 lines, table is [Controle DC 200$]);

NEXT ExcelFile;

There is an error on the Excel File in the load section and i can't use this variable.

Do you know how to use this filename in the load section ?

Thanks

1 Solution

Accepted Solutions
paulcalvet
Partner - Specialist
Partner - Specialist
Author

Hi i find the answer :

load

subfield(Filename(),'.',1) as [BranchFromFilename],

Results

By

View solution in original post

1 Reply
paulcalvet
Partner - Specialist
Partner - Specialist
Author

Hi i find the answer :

load

subfield(Filename(),'.',1) as [BranchFromFilename],

Results

By