using the export CSV all fields exports a csv with all fields regardless of what fields are used in the search.
is there a way to exclude a number of custom fields if not used with in the projects within the search?
The only way to do this is to create a filter that contains all of the fields that you want to export. Conceptually, all fields are available to all projects to use, so there is no way for Jira to determine which fields are associated with a specific project. It is possible to use a field doesn't appear on a screen, so that wouldn't work for Jira to automatically exclude fields. I suppose that Atlassian could add a feature like "Export only fields associated with the Create/Edit Screens" but that is a feature enhancement and not currently available.
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events