cancel
Showing results for 
Search instead for 
Did you mean: 

Impex Export Multiple Headers Into Single CSV File

Former Member
0 Kudos

Is it possible to create an export file that has multiple headers but that returns all of the data in one csv file? I know this is possible in hmc by setting "Export as" to "CSV file" as opposed to a Zip archive, but I am wondering if it is possible to do it in hac.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Have a read through https://help.hybris.com/6.3.0/hcd/8bee24e986691014b97bcd2c7e6ff732.html, namely "Structure of an Export Script"?

You can set the csv output file for each header, and that should be reflected in the importscript.impex that is included with your export ZIP. Since the headers aren't provided in the CSV, rather, an importscript.impex file referencing each of the CSVs, this isn't the standard behavior. You could write a custom export cronjob to output a custom formatted file, or perhaps use some scripting in the impex for a kludgy approach.

 "#% impex.setTargetFile( ""some-arbitrary-file.csv"", true, 1, -1 );"
 
 insert_update Language;active;fallbackLanguages(isocode);isocode[unique=true];name[lang=de];name[lang=en]
 "#% impex.exportItems( ""Language"" , true );"
 
 insert_update AnotherType;code[unique=true];name[lang=en]
 "#% impex.exportItems( ""AnotherType"" , true );"

The above would likely generate an export ZIP having:

  • importscript.impex, containing:

    • Impex headers for Language

    • import of some-arbitrary-file.csv

    • Impex headers for AnotherType

    • import of AnotherType.csv (default convention, since no target file was defined)