Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Pleasefind attached one CSV file format.
Can any one help me to load this CSV file in Qlikview application.
Issue is QV appilcation not loading the CSV file due to some column dont have header name(field name) but it has data.
Thanks,
Antony
Can any one help me to solve the above Query.
Hi,
Qlikview doesnot understand the space as field header. Instead of using Embeded Label use explicit label and define your labels after loading.
Hope this will help
If i have more than 100 fields then how can i rename each & every fields.
is there any other option to rename blank header column.
Hi Antony,
Please find the attched qvw, hope this will help you.
Use Explict label and remove the header.
Hi Sri,
If i have less fields then not a problem to do rename but i have more than 100 fields in each CSV file with some blank header name.
Its better to suggest them to add field name in log itself
Sivaraj S
Hi Antony,
Please check, Is there any possibilty in Excel to fill the empty cells to string.
Regards,
Siri
Hi Antony,
Use this script to rename your missing fields with MissingField1, MissingField2 etc. if too many to rename. Ensure you have a RowNo() in your data table to identify the top row which needs deleting.
Data:
LOAD
RowNo() AS Hdr,
@1, ...
FROM
[test_customer.csv]
(txt, codepage is 1252, no labels, delimiter is ',', msq);
let fldCount = NoOfFields('Data');
let fldMissing = 1;
For c = 2 to fldCount // ignore col 1 as the link
let fldName = FieldName('$(c)','Data');
let fldValue = FieldValue('$(fldName)',1);
if fldValue = '' then
let fldValue = 'MissingField' & '$(fldMissing)';
let fldMissing = fldMissing +1;
end if;
RENAME FIELD '$(fldName)' to '$(fldValue)';
Next c;
right keep (Data)
load Hdr resident Data where Hdr <>1;
DROP FIELD Hdr;
flipside
Hi flipside,
Just wondering why you need a RowNo() as the first field. I deleted it and it works fine as well. Could you explain me that? Thank you.
Regards,
Xue Bin