Discussion board where members can learn more about Qlik Sense App Development and Usage.
I have a QlikView model which I'm busy converting to Qlik Sense. I'm now stuck and would like to find out if someone has resolved this and/or if there is a resolution.
In QlikView I read all .xlsx files from a specific directory (these files are stored here every month). Then I read all the sheets of each of those Excel files but make use of the "SQLTABLES" to access those Worksheets. In other words, I loop through all Excel files in a specific directory and then read all columns of all Worksheets within each Excel file. And there is no standard this is all dynamic.
Now, I can do this in Sense by creating an ODBC to the Excel file (which is now a LIB connections) but I cannot do this dynamically. So I can loop through the Excel files (the directory), and I can loop through each Worksheet, but ONLY for 1 Excel files which you have to set up on ODBC.
Can someone please tell me if this is actually possible and how this can be achieved in Sense?
Solved! Go to Solution.
Not quite sure this is what you want but here it goes...
try to make sense with your excel files. For example, gave them the same inicial name: ExcelFile, ExcelFile, etc...
And then on data load editor put FROM [lib://NS/ExcelFile*.xlsx]
This should load all files in directory that start with ExcelFile
And then give your sheets the same name too.
(ooxml, embedded labels, header is 5 lines, table is ExcelFileSheet
This is suppose to make you data load editor, to load all files, whose name starts with ExcelFile, and all sheets with name EscelFileSheet.
Let me know if there's something you didn´t understand
sub ReadMultipleExcel (Root)
For Each File in filelist (Root&'\*.xlsx')
Load * FROM [$(File)] (ooxml, embedded labels, table is YourSheet)
Call ReadMultipleExcel ('lib://YourFiles')
It will loop through every xlsx file and read it's content.
As far as I get your state, you have same structured files, but other timestamp in filename.
The $(File) variable contains the filename, you can extract the date from it.
Have a look to this doc , it helped me for the same case :
Hi all, thanks for all the feedback. But there is one thing I think you miss in my question. The above all works 100% in QlikView. My questions is has someone actual managed to get this done in Qlik Sense. I'm using Qlik Sense quite a lot now and I can loop through the files with no problem. As soon as you try to loop through the sheets, you get the problems.
Anyone managed this in Sense somehow?
Thanks Bruno, but I would have liked to do this in Qlik Sense without the "Legacy mode". My guess is that this is not yet possible.
No I did not yet find another way, but the above solution from John. I will try again with the new Sense versions, and reply once I can get this to work.