Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Does this script work? I want to load data without the labels and using column count. However, to date, I am still unable to load up @1.
Does loading without labels work for xlsx files?
LOAD
@1 AS Com,
@2 AS 201003,
@3 AS 201004,
@4 AS 201005,
@5 AS 201006,
@6 AS 201007,
@7 AS 201008,
@8 AS 201009,
@9 AS 201010,
@10 AS 201011,
@11 AS 201012,
@12 AS 201101,
@13 AS 201102,
@14 AS 201103,
@15 AS 201104,
@16 AS 201105,
@17 AS 201106,
@18 AS 201107
FROM
[\\directory\documents\DEV\MIP.xlsx]
(ooxml, no labels, header is 2 lines, table is [DataHist2]);
Thanks,
Hi
The @1 syntax appears not to work for xlsx files. To load unlabelled column, you must use the column letter from Excel, like this:
LOAD A AS ItemID,
B AS ShortCode,
C AS ItemName
FROM
Test..xlsx
(ooxml, no labels, table is Sheet1);
Hope that helps.
Jonathan
Hi,
1. The above scripts works surely.
2. You can load data without labels for xlsx files and you can use column count for that field i.e count(@1) or count(com).
- If possible can you attach sample file..
Hi
The @1 syntax appears not to work for xlsx files. To load unlabelled column, you must use the column letter from Excel, like this:
LOAD A AS ItemID,
B AS ShortCode,
C AS ItemName
FROM
Test..xlsx
(ooxml, no labels, table is Sheet1);
Hope that helps.
Jonathan
The @1 would surely work with an xls file. As mentioned by Jonathan, column letter would work for an xlsx file.
Thanks Jonathan!
Brilliant, it's working fine now!