From ac71dc1b1965ba0a550649edc2f63589ace10196 Mon Sep 17 00:00:00 2001
From: Kevin Cristiano <kcristiano@kcristiano.com>
Date: Thu, 3 Sep 2020 09:42:34 -0400
Subject: [PATCH] Export to Excel Patch

updated for 5.29.0
---
 civicrm/CRM/Report/Form.php | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/civicrm/CRM/Report/Form.php b/civicrm/CRM/Report/Form.php
index d202b84561..449e1a087c 100644
--- a/civicrm/CRM/Report/Form.php
+++ b/civicrm/CRM/Report/Form.php
@@ -1465,7 +1465,7 @@ class CRM_Report_Form extends CRM_Core_Form {
     if (!CRM_Core_Permission::check('view report sql')) {
       return;
     }
-    $ignored_output_modes = ['pdf', 'csv', 'print'];
+    $ignored_output_modes = ['pdf', 'csv', 'print', 'excel2007'];
     if (in_array($this->_outputMode, $ignored_output_modes)) {
       return;
     }
@@ -2900,6 +2900,12 @@ WHERE cg.extends IN ('" . implode("','", $this->_customGroupExtends) . "') AND
         $this->addPaging = $this->outputHandler->isAddPaging();
         $this->_absoluteUrl = $this->outputHandler->isAbsoluteUrl();
       }
+
+    }
+    elseif ($this->_outputMode == 'excel2007') {
+      $printOnly = TRUE;
+      $this->_absoluteUrl = TRUE;
+      $this->addPaging = FALSE;
     }
     elseif ($this->_outputMode == 'copy' && $this->_criteriaForm) {
       $this->_createNew = TRUE;
-- 
GitLab