Loading data from files
Qlik Sense can read in data from files in a variety of formats:
- Text files, where data in fields is separated by delimiters such as commas, tabs or semicolons (comma-separated variable (CSV) files).
- dif files (Data Interchange Format).
- fix files (fixed record length).
- HTML tables.
- Excel files (except password protected Excel files).
- xml files.
- Qlik native QVD and QVX files.
In most cases, the first line in the file holds the field names.
Files are loaded using a LOAD statement in the script. LOAD statements can include the full set of script expressions.
To read in data from another Qlik Sense app, you can use a Binary statement.
Example:
directory c:\databases\common;
LOAD * from TABLE1.CSV (ansi, txt, delimiter is ',', embedded labels);
LOAD fieldx, fieldy from TABLE2.CSV (ansi, txt, delimiter is ',', embedded labels);
Loading data from a file in the data load editor
Instead of typing the statements manually in the data load editor, you can use the Select data dialog to select data to load. Do the following:
- Open the data load editor.
- Create a Folder data connection, if you don't have one already. The data connection should point to the directory containing the data file you want to load.
- Click on the data connection to open the data selection dialog.
Now you can select data from the file and insert the script code required to load the data.