Skip to content

Magento 2, How to split the billing/shipping address columns of CSV in sales order export gridToCsv

In Magento 2.4.7, I need to export the order details in CSV and XML by splitting the Billing and Shipping address, which is currently concatenated.
ie., Currently, Billing and Shipping Address are coming as a Single Column. Need to split it as individual fields like Street, City, Country, Zip code etc.

How to achieve this.

I tried this, I am getting the columns as empty.