Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I need to create a Straight Table, that depending on the variable that receives the name of an excel file, it will be loaded in this table.
This table will be created when the variable vNameFile is informed, for example vNameFile='C:\Folder_AExcelfile_001.xlsx'.
There can be an indeterminate number of files and have different fields and size, which we do not know a priori.
That is to say, I seek to load dynamically the Straight Table with files that we do not know their content a priori.
I can not use Macros since the application will be executed on the Web.
Thank you very much in advance.
Can you load using wildcard *?
LOAD *
From ($vFilename)...
or
LOAD *
From [c:\folder\*.xlsx]...
-Rob
Hello,
Thank you very much for answering, I don't think that solves what I need, let me explain:
I have a button, that when pressed, I need to load in a Straight Table dynamically the file that is stored in a variable, this file depends on the field that is selected in a certain table, there are many files.
a variable, this file depends on the field that is selected from a certain table, there are many files.
Each file excels sheets, that have different fields, I want that in that table any excel sheet is loaded,
that is to say, that this Straight table is able to load any selected excel sheet.
The operation would be:
-Somehow, a field has been selected, which contains the name of an excel file.
-When pressing a button, that excel sheet must be loaded in a dynamic table.
-A Sheet is shown with the previous Straight Table that will contain the excel file commented.
-Once the table with the excel content is shown, it can be closed and deleted from the memory since they are files with a lot of content.
-If another field is selected and the button is pressed, the previous process will be repeated.
Thank you in advance.
I gave you an answer for loading data in the load script. I now understand you want to read and display this spreadsheet in the UI (Front end).
There is no simple solution I'm aware of. A couple of approaches I can think of if you're willing to do a bit of work.
1. Write a visualization extension to read and display the file. You would also need a backend webservice to read the file because the browser cannot read from the filesystem. Maybe such an extension already exists?
2. Using something like the Dynamic Views or On Demand Apps feature to load the data on demand. Although I'm not clear how this would specifically work in this case. Perhaps others have ideas.
3. Use a Server Side extension. A function to load and display the file could be added to something like https://github.com/RobWunderlich/qcb-qlik-sse
4. Just provide a link which will cause the file to be downloaded and then the user can open with their local Excel.
I think it is challenging but potentially very interesting. I may be missing a simpler solution, maybe others have ideas.
-Rob
Hello, it is indeed what I want.
I know it is complex to implement, display information on demand (Straight Table associated with the selections that exist at the moment), with the characteristics of requiring memory space, having different fields, etc...
I wanted to launch another question associated with the problem, is it possible at runtime, once the initial load script has already been executed, to have a Straight Table, which is loaded dynamically and adapts to the required fields of the moment, that is to say, that this Table a priori can load different types of excel sheets, for example, each time we press a button.
Thank you very much for your contributions.
Read up on the option #2 I mentioned above. On Demand App Generation (ODAG) or Dynamic Views. One of those options may give you what you need.
-Rob
Hello, I will look into that alternative.
Thank you very much