I want to export table content in downloadable csv format. In magento 1.x it can be achieve by
_prepareDownloadResponse() how can we achieve same in magento 2. Looks like this function is missing in magento 2. Is their any alternative for this.
Please note that I don't want to use
header() I am already using this which is working but i want to implement it by magento way as this gives warning at the time of extension upload in Magento connect.