The CSV module provides a function to export the visible rows and columns as CSV.
Converts the list of visible items and properties to a Comma Separated Values string
Converts the list of visible items and properties to a Comma Separated Values string