Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have following excel Filestructure.xlsx
Filestructure.xlsx
Filename | Fields |
---|---|
Data_Level_*.csv | ID |
Data_Level_*.csv | EMP_NAME |
Data_Level_*.csv | EMP_LOCATION |
Data_Level_*.csv | CODE |
How can we validate the .csv in following folders on the basis of Filename and Fields?
if following csv files doesn't have filename standard and table structure which mentioned in Filestructure.xlsx Qlikview should give the information of compliance in txt
Sorry can't work on whole question..
I can guide you though..
Load your file..
now use something as below
TMP:
NoConcatenate FIRST 1 LOAD * FROM YourFileName.xlsx;
IF FieldNumber (ID) = 0 then Trace....
IF FieldNumber (EMP_NAME) = 0 then Trace....
etc etc
Sorry to ask you again ! Could you please explain little more?
To validate the fieldname.. load the first line of table/file..
now use FieldNumber Function.. if that field exists then you will get >0 ..
Hope this will make clear..
what information you want to give in text? like below ?
Number of fields not matched
There is additional column
Field names are different
Hi Kushal,
Yes this information need to have in txt file.
Please share your approach that would be very helpful.
another option to get a list of files and fields contained:
tabCSVFiles:
CrossTable (Field, Value)
LOAD FileName() as File,
*
FROM [Data_Level_*.csv] (txt, utf8, embedded labels, delimiter is ',', msq)
Where RecNo()=1;
hope this helps
regards
Marco