Linking table made through query and an excel file through Qlik Script
I was just wondering how to import excel files in Qlik Sense through the script. I've also generated a table using SQL query connected to our database and I was curious if it is possible to link that table and the new imported excel file?
To load data from an excel file using the script editor (i.e. not dragging and dropping it on to the data manager or adding it via the data manager) you need to:
locate or create a data connection to a directory in which your excel file resides (note that relevant security rules will restrict what you can access)
With the aforementioned data connection click on "select data" to locate your excel file
Using the presented dialog to select options such as header rows etc
click on load data.
General help on this process is available online here.
Linking the data to a table isn't just possible, it's what Qlik does better than any other tool available via the associative model. I highly recommend googling terms such as "the Qlik associative difference" and reading the white papers etc you find.
To link the two data sets it is as @dilipranjith has described, you simply need a column in each dataset that is the same name. You can easily rename a column either via the process of adding or by renaming the column in the script directly:
Col1 as [My Col Name],
There's lots of example script in the online help and in the various downloadable demos and other solution examples here on community.