Created
August 17, 2018 05:25
-
-
Save rafaehlers/875fcca895a0687027388c2cae83955b to your computer and use it in GitHub Desktop.
Filter to change the filename of the exported .XLSX file and to remove the first row containing the document title
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php // MAKE SURE TO REMOVE THIS FIRST LINE BEFORE COPYING THIS CODE TO YOUR FUNCTIONS.PHP FILE | |
| add_filter('gravityview/datatables/button_excel','gravityview_excel_export_settings', 10 ,2); | |
| function gravityview_excel_export_settings( $button_config = array(), $view_id){ | |
| $button_config['filename'] = 'dt-excel-test'; //you can change the filename here (don't type the extension) | |
| $button_config['title'] = ''; | |
| return $button_config; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment