main ExportItems functionality