We all know that data entities that have the same root datasource (table) as a form will cause the data entity to automagically appear in the form's Open in Excel menu option.  What if you need to force add this option via extension?  It's a very reasonable request that you'll get asked to do, and is surprisingly hard to research.  Until now.  

The code has changed a bit throughout D365's evolution.  If anything, it's gotten simpler since you no longer have to implement any ExportToExcel* classes.

Need more fields to appear in your Excel sheet? Add them to the AutoReport fieldgroup of the table!