I need to import a Excel-file that seems to be a "pivot-table" of sort.
It contains 6.000 rows representing objects (products), and the columns holds the properties for all types of objects.
call apoc.load.xls('file:///export.xlsx','Sheet1') yield map return * lists 1000 columns.
I am looking for a way to import this without explicitly listing all columns/properties if tis is possible?
Something like this:
call apoc.load.xls...
yield... something
create 'product' set properties = xls columns
Thanks in advance!
Regards,
Bent
mckenzma
(Michael McKenzie)
March 28, 2022, 12:03am
2
Are you attempting to import each row and just create nodes for each row? Or are you trying to create nodes and relationships?
Just adding a link to the documentation in case. I think using a mapping might help solve the issue.
@bent.s.lund
see also https://neo4j.com/docs/cypher-manual/current/clauses/set/#set-setting-properties-using-map and where apoc.load.xls
yields a map you could do similar to
call apoc.load.xls('file:///export.xlsx','Sheet1') yield map create (n:Product) set n += map;
2 Likes