I set up my Excel exports using Grid with Initial Module set to be Excel.
When I go to Export, if there are no records it still creates an empty Excel spreadsheet to download.
Any code I place on the OnScriptInit or OnApplicationInit events gets ignored.
Is there a way to prevent it from generating a spreadsheet if there are no records?