Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
sarahallen1
Creator II
Creator II

Only need filename() and filetime() but ooxml XLSX files are huge and takes 30 seconds just to get this (FIRST 1 LOAD)

This is part of a more complex script but I've isolated/simplified the problem part of code - see below.

There are 4x matching files in the directory matching the * wildcard format.  It takes almost 3 minutes to load this tiny bit of script - over 30 seconds per file.

The problem is there are almost 400 columns in these files (XLSX / ooxml).  But I don't care about the columns or file content at this point, I just want the filename/filetime (in my bigger script I'm only loading data from those with filetime>=lastreload, so this initial step is just to get a list of new files).  

Is there any way Qlik can produce a file directory (including filetime) without trying to interpret the file contents, which is what seems to take ages?

Thanks in advance.

 

 

Test:
FIRST 1 LOAD FileBaseName() as filename,
FileTime() as filetime
FROM
[\\server\share\folder\namingconvention_*.xlsx]
(ooxml);

 

 

 

filetime, filename, dir, dirlist, filelist, directory, biff, incremental

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You can use the "For Each... filelist()" script to get file information without opening the files.  See

https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptControlS...

-Rob

View solution in original post

3 Replies
sarahallen1
Creator II
Creator II
Author

Edit: I think I mean OOXML not BIFF (XLSX)

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You can use the "For Each... filelist()" script to get file information without opening the files.  See

https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptControlS...

-Rob

sarahallen1
Creator II
Creator II
Author

Excellent, so much quicker!  Thank you Rob.