The XYZ and ESRI Ascii formats are not exposed with ENVI_OUTPUT_TO_EXTERNAL_FORMAT but you can use the same (unexposed) routine mentioned in this Help Article:
http://www.exelisvis.com/.../ArticleID/4133.aspx
The exception would be to replace the /output_xy keyword with /esri_header.