Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
My goal is to export a full table to .csv file. In addition, I want to add a delimiter which I determine.
I understood the best/easiest way to do so in Qlik Sense is by using STORE command in the script. No need for VBA macros.
Does anybody have suggestions for the exact syntax?
Thanks!
The issue occurs in your Data connection 'lib://Microsemi EDI_Schema (win-n5h9rv84sq3_administrator).
When you are using single quotes (' ') in the store command for your path, the sense is storing the data in xml, in order to exclude ' ' , avoid the spaces in between the data connections folder or make sure you avoid (win-n5h9rv84sq3_administrator) in the folder data connection name. it will work.
For eg, you Script and Store should command should be as shown below :
DimKanban:
LOAD
KanbanCode,
SubcontractorCode,
SupplierCode,
StateCode,
CountryCode,
City,
KanbanName,
VendorCode,
IsKanbanBlocked,
Continent,
CountryName,
EuropeanRegion,
Region,
CountryTimeZone,
StateName,
StateTimeZone,
SupplierName,
SupplierType,
SubcontractorName,
Plant,
Sloc
FROM [lib://ServerLogFolder/DimKanban_Temp1.qvd]
(qvd);
Store DimKanban into lib://ServerLogFolder/testcsv12.csv (TXT);
And also i have attached the output csv file from this store command.
STORE TableName into C:\Path\TableName.csv(txt);
Hi Govind,
Tried your suggestion, I get the following error:
This statement only works with lib:// paths in this script mode
My mistake, QS work on libraries
try
STORE TableName into TableName.csv(txt); //I think this will store in same folder where your app is stored.
In Qliksense for any folder you need add an connection/lib path for that ...go to edit script > to the right you will see an option folder > select and add the desired folder location then while storing use the connection name for it or simply the lib path its will store automatically
Hope this helps you
Hi Govind,
Unfortunately, still no success. See error below (In the script I have a semicolon at the end of the phrase).
I also tried the following syntax without success:
Store * From DimKanban into testcsv.csv(txt);
Error here:
No qualified path for file: ***
The error occurred here:
Store DimKanban into testcsv.csv(txt)
Hi Avinash,
Actually, I tried this before and indeed a CSV file was generated. However, it's format is very strange.
I also tried exporting to a .txt file
I attach the files for your reference.
Second file
Could you share the complete script please ? I suspect the data is been converted to XML format that is the reason your getting this output
Have you tried giving it a fully qualified path name? Like C:\SomeDir\SomeOtherDir\testcsv.csv(txt)