Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
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