You can add customer_id(entity_id) in export CSV using following way :
You just simply add entity_id field in $validAttrCodes array in following file:
You can change in public function export() function.
public function export()
$collection = $this->_prepareEntityCollection(...
Part one: Understanding Magento
Let me first explain what's going on, and why you're getting the result you're getting:
If you look at the columns defined in module-customer\view\adminhtml\ui_component\customer_listing.xml you'll see that stuff like billing_postcode and billing_city are already available / exported, only they're labeled als ZIP and City:
Magento checks all attributes in the CSV file before importing. And if there are some attributes that are either not assigned to attribute set or have no backend model defined, then Magento throws an error like the error which you are getting.
You need to make sure that your custom customer attributes are assigned to a set. Otherwise, the following code ...
I have solve issue by adding _address_firstname
and _address_lastname in header.
in my file missing above column and so its display error of firstname is invalid.
Below is header value using space separated and its working now.
email _website _store store_id created_in website_id group_id firstname lastname _address_telephone ...