Discussion Board for collaboration on QlikView Scripting.
I have few excel files from which I should be extracting the data.
The excel file name is in the below format.
Test dashboard PKC00002 Health Checks_31May17.xlsx
While extracting data from the file, how do I extract the primary key from the name of the file. In the above example, it would be "PKC0002"
Thanks in advance.
Go to Solution.
check below code
FileBaseName() as FullName,
subfield(FileBaseName(),' ',1) as FirstName
(biff, embedded labels, table is Sheet1$);
Hi you can try below with your code
FileBaseName() as new,
subfield(FileBaseName(),' ',1) as x
Use below code in load script
It works Fine.
Is they filenames coming from any external source as field? If so, SubField(FieldName, ' ',1) as FieldName